How to set current date in import field mapping for Netsuite when the source CSV file (export) doesn't have that data?
I am exporting data from a CSV file located in FTP location and importing it into Netsuite to create a Bill. One of the fields in the Bill expects a value for "Date" and the csv file doesn't have that data. We want that date to be the current date whenever the integrations runs. At the import side (Netsuite), how do I map the Date field in order to ensure it takes the current date?
0
Comments
Hi Swapnil Shah, I think you just need to hardcode that field with the following handlebars expression:
Please let me know if that solution works for you.
Tom
Hi Tom, It didn't work. I used the following handlebars expression:
It gave me below error message:
"Failed to create, update/transform record because You have entered an Invalid Field Value NaN/NaN/ NaN for the following field: trandate"
What should I try?
Hi Swapnil Shah,
{{timeStamp}} generates a UTC value, which is usually what NetSuite expects.
That "trandate" error might be a clue that you have to send MM/DD/YYYY instead. Try this slightly modified handlebars statement to convert it to that format:
Tom
Hi Tom,
Thanks for your help. I tried the new handlebars expression. I am getting the below error message now:
"Invalid date(time) value: {{dateFormat \"MM/DD/YYYY\" timeStamp}} with date(time) format: MM/DD/YYYY"
Please advise.
Thanks,
Swapnil Shah
Hi Swapnil Shah,
Can you please try the following?
Tom
Hi Tom,
The following handlebars expression worked when I tried again:
{{dateFormat "MM/DD/YYYY" timeStamp}}
Thanks for your help, I really appreciate it!
Regards,
Swapnil Shah
Please sign in to leave a comment.