Retrieve a Specific Custom Field from a NetSuite Response

To retrieve a specific custom field ID from a NetSuite response, you can specify either internalId or scriptId as an XPath filter along with a value.

This example describes how to map a custom field ID to a target element (for this example, named ICSEmailId) with the scriptId XPath filter.

  1. Open the mapper.
  2. Click the target element to access the Build Mappings page to assign a custom field ID (for this example, ICSEmailId is selected).
  3. Under customFieldList in the response schema of the Source section, drag the value element of the type of custom field you want to retrieve to the Statement section (for this example, the value field of StringCustomFieldRef is dragged).
  4. Click the Edit icon to show the select section.
  5. Copy and paste the entire statement of the select section into a text editor such as Notepad.
    Customer/nsmpr6:customFieldList/nsmpr5:customField[(fn:resolve-QName(@xsi:type, .) = 
    fn:QName('', 'StringCustomFieldRef'))]/nsmpr5:value" xml:id="id_58"/>
  6. Add the {@scriptId] filter with [ ] brackets and assign a custom field ID (for this example, [@scriptId="custentity23"] is added).
    Customer/nsmpr6:customFieldList/nsmpr5:customField[(fn:resolve-QName(@xsi:type, .) = 
    fn:QName('', 'StringCustomFieldRef'))]
    [@scriptId="custentity23"]/nsmpr5:value" xml:id="id_58"/>
  7. Copy the updated statement and return to the mapper.
  8. Right-click the current statement and select Input Literal.
  9. Paste the updated statement into the field.
  10. Click Save.

    The value for the custom field now appears in your response.