Skip to main content

How to set current date in import field mapping for Netsuite when the source CSV file (export) doesn't have that data?

Comments

6 comments

  • Tom Santiago Principal Technical Writer Community moderator
    Engaged
    Top Contributor
    Celigo University Level 4: Legendary

    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
  • Swapnil Shah
    Celigo University Level 4: Legendary
    Engaged
    Awesome Follow-up

    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
  • Tom Santiago Principal Technical Writer Community moderator
    Engaged
    Top Contributor
    Celigo University Level 4: Legendary

    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
  • Swapnil Shah
    Celigo University Level 4: Legendary
    Engaged
    Awesome Follow-up

    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
  • Tom Santiago Principal Technical Writer Community moderator
    Engaged
    Top Contributor
    Celigo University Level 4: Legendary

    Hi Swapnil Shah

    Can you please try the following?

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

    Tom

    0
  • Swapnil Shah
    Celigo University Level 4: Legendary
    Engaged
    Awesome Follow-up

    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.