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

6 comments
Date Votes
  • Hi Swapnil Shah, I think you just need to hardcode that field with the following handlebars expression:

    {{timestamp MM-DD-YYYY}}

    Please let me know if that solution works for you.

    Tom

    0
  • Hi Tom, It didn't work. I used the following handlebars expression:

    {{timestamp MM/DD/YYYY}}

    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?

     

     

    0
  • 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:

    {{dateFormat "MM/DD/YYYY" timeStamp}}

    Tom

    0
  • 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

    0
  • Hi Swapnil Shah

    Can you please try the following?

    {{dateFormat "MM-DD-YYYY HH:mm:ss" timeStamp}}

    Tom

    0
  • 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

     
    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post