Multi-Field mapping to NetSuite items list

Comments

3 comments

  • Official comment
    Saikumar Rachamalla Docs Team Lead Principal Technical Writer

    Thanks for sharing this Lakhan Bhagnani. Please let us know if this works Bryan Carroll otherwise, please raise a support team and our team will assist you in resolving the issue. Thanks!

  • Lakhan Bhagnani Integration Engineer
    Answer Pro

    Hey Bryan,

    I have faced a similar thing before and was curious to understand why and how we can do it.
    Why it didn't set for the rest of the items is "Shipping.country" is single in an object whereas Line items is an array of objects hence we were able to set the value only once. 

    To workaround, I have added if handlebar to iterate the handlebar for each line_item.

    {{#if line_items[*].name}}{{#compare shipping.country "==" "CA"}}3242{{else compare shipping.country "==" "US"}}324{{else}}540{{/compare}}{{/if}}

    Let me know if that works for you.

    0
  • Bryan Carroll

    Lakhan Bhagnani  This works perfectly.  Thanks!  I figured that it was because was shipping.country was a scalar and not an array, but wasn't 100% sure.

    0

Please sign in to leave a comment.