Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to 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: