Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Why can't I set the state for an address using a script?
Hi
I am trying to create an address subrecord using a map reduce script.
Most of it works fine other than:
- It is not possible to set the state field
The relevant lines in the script are:
var leadId = inputData.id
var address1 = inputData.values['custentity_shipping_address_1']
var address2 = inputData.values['custentity_shipping_address_2']
var city = inputData.values['custentity_shipping_address_city']
var state = inputData.values['custentity_shipping_address_state'].value
var postCode = inputData.values['custentity_shipping_address_postcode']
Based on the debug log, this is returning the internal id of the state.
However, it appears as:
Tagged:
0