Hardcode multiple lineitems (array)

I'm trying to write multiple Currencies to a Netsuite Account. The salesorder has an array called Currency, that holds Currency records. And I would like to fill this list of currencies in a mapping. 
Something like this: 
{"internalId":"2", "internalid":"7"}

      to

Currency[*].Currency

Anyone know how I would go about doing this?

0

Comments

2 comments
Date Votes
  • This is the closest result I can get:
        "Currency": {
          "lines": [
            {
              "currency": "{\"1\",\"7\"}"
            }
          ]
        }

     

    But obviously I would like 

        "Currency": {
          "lines": [
            {
              "currency": "1"
            },        
            {
              "currency": "7"
            },       
          ]
        }

    0
  • Hello Marco Pietersen

    I saw that you got a solution to this issue in a help ticket. In case others run into your issue, I'm posting the general idea behind the solution here. 

    The best way to map this information is to create a preMap hook script with an array of currencies. Then, you can map it against the Currency field in NetSuite. 

    Thanks! 

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post