Custom Fields Discovery with the Oracle NetSuite Adapter
You can expose simple type and complex type custom fields for standard objects when designing an integration in the mapper and during NetSuite endpoint creation for advanced search and saved search operations with the Oracle NetSuite Adapter. In the mapper, discovered custom fields are available for all search and CRUD operations. During endpoint design time for advanced and saved searches, discovered custom fields are available during the response column selection.
Note:
To ensure that custom field discovery works across different Oracle NetSuite accounts without re-editing the integrations, keep the scriptId consistent across these accounts. This can be ensured by creating the required custom field(s) with the same scriptId across Oracle NetSuite accounts.Expose Custom Fields for Standard Objects in the Mapper
You can expose simple type and complex type custom fields for standard objects when designing an integration in the mapper with the Oracle NetSuite Adapter.
Note:
The Oracle NetSuite Adapter does not discover named custom fields for all standard objects.- Create an orchestrated integration.
- Add a trigger connection to the integration. For this example, a REST Adapter is
added and configured as follows:
- Perform a POST action on an endpoint.
- Send a JSON request payload to the endpoint.
- Configure this endpoint to receive a JSON response payload in return.
- Add an Oracle NetSuite Adapter connection (for this example, named
NetSuiteUpsertCustomField) to update (upsert) a
custom field.
Note:
To use a connection created prior to the release of support for discovering custom fields, you must first select Refresh Metadata from the menu on the Connections page for this Oracle NetSuite Adapter connection. This task is not required for a new Oracle NetSuite Adapter connection. See Refresh Integration Metadata. - Configure the customer request in the mapper between the REST
Adapter and Oracle NetSuite Adapter. For this example, a Customer
Update operation is configured.
- Expand the target Customer >
customFieldList >
customField and note the source
internalId and
scriptId elements. To map to the correct
custom fields in the mapper, you must pass in the internal ID value to
the internalId and
scriptId elements that you obtained from the
NetSuite application described in Prerequisites for Using Complex-Type Custom Fields in an Integration. This is the method for mapping the
customField. You must map by finding out the
internalId and
scriptId values from NetSuite.
- Click the target elements to add the values to pass. When
complete, an A is displayed in the
Mapping Canvas. For this example:
- The internalId value is configured with 4565.
- The scriptId value is configured with custentity_cust_priority. The scriptId comes from the NetSuite application.
- Map to the custom fields for the standard objects, which
are displayed one level up under Customer >
customFieldList.
For basic CRUD operations, the custom fields are exposed in the mapper as named fields. Custom field names are derived from the name given to the custom field in NetSuite. This makes mapping easier without needing to know the internalId and scriptId of a particular custom field for the standard object. For this example, the mapping is done for a NetSuite update operation. Request mapping is shown from the REST Adapter trigger connection to the NetSuite update operation on the standard objects.
Description of the illustration netsuite_custom_fields.pngThere are two types of custom fields (both shown in this example):
- Complex: Enable you to pass in more than one item.
For this example, the target complex field
AdvertisingPreference is shown
expanded in the mapper with 1 of 2
ListItem and 2 of 2
ListItem for passing in two values. If you
expand ListItem, the
listItemId field is displayed.
listItemId refers to the
internalId of one of the list members
of the complex type custom field. This is not the
internalId of the
customField.
- Simple: Enable you to pass in one item. For this
example, the target simple field
ICSEmailId is shown expanded in the
mapper with nil for passing in one
value.
- Complex: Enable you to pass in more than one item.
For this example, the target complex field
AdvertisingPreference is shown
expanded in the mapper with 1 of 2
ListItem and 2 of 2
ListItem for passing in two values. If you
expand ListItem, the
listItemId field is displayed.
listItemId refers to the
internalId of one of the list members
of the complex type custom field. This is not the
internalId of the
customField.
- Expand the target Customer >
customFieldList >
customField and note the source
internalId and
scriptId elements. To map to the correct
custom fields in the mapper, you must pass in the internal ID value to
the internalId and
scriptId elements that you obtained from the
NetSuite application described in Prerequisites for Using Complex-Type Custom Fields in an Integration. This is the method for mapping the
customField. You must map by finding out the
internalId and
scriptId values from NetSuite.
- Add a second Oracle NetSuite Adapter (for this example, named NetSuiteGetCustomField) to
get the customer account number.
- Configure the mapper between the two Oracle NetSuite Adapters to pass the source internalId to the target
internalId.
- Configure the mapper after the second Oracle NetSuite Adapter (NetSuiteGetCustomField) under the source
CustomerResponse > Customer
> sequence > customFieldList
to get the customer response.
Integration design is now complete.
Expose Custom Fields in Advanced Search And Saved Search Operations
You can expose simple type and complex type custom fields during NetSuite endpoint creation for advanced search and saved search operations with the Oracle NetSuite Adapter.
This use case provides a high-level overview of the design process for the following integration:
- Create a scheduled integration.
- Add an Oracle NetSuite Adapter connection (for this example, named
NetSuiteAdvancedSearch) to the integration.
- On the Operations page, select Search on
selected Business Object and related objects. Also select columns to
return.
- On the Search Configuration page, click the Click
to Add Response Columns link.
- Scroll through the Select the Fields
list to select the custom fields on which to search, then click
OK to return to the Search Configuration
page. Custom fields are identified by an asterisk.
- On the Operations page, select Search on
selected Business Object and related objects. Also select columns to
return.
- Note that your custom field selection appears at the bottom of the
page (for this example, named PushToSalesforce).
- As with the first use case in this section, pass the internal ID
value to the internalId and
scriptId elements. For this example, they are located
under CustomerSearchAdvanced >
customFieldList >
customField.
- Configure the target custom field for the standard object (the
configured field is identified by the A). For this
example, it is displayed one level up under
CustomerSearchAdvanced >
customFieldList >
PushToSalesforce.
- Configure a for-each action in which the
PushToSalesforce custom row is selected as the
repeating element over which to iterate.
- Configure the remaining parts of the integration, as necessary. For this example, a logger action is configured.
Integration design is now complete.