Link

NetSuite Picklist and Lookup Field IDs

For both Picklist fields and Lookup fields, NetSuite requires the ID Value during record modification or creation.

Please be aware that in NetSuite, a user may be familiar with selecting from a dropdown/picklist menu and looking for a text value. However the data passed to NetSuite by Breadwinner must be a numeric ID. (Please note this is the opposite of Salesforce, which requires the text value when populating a picklist).

Finding the ID of Standard Picklists

The IDs of NetSuite Standard picklists can be found in different locations. Some of the possible places these standard picklist values can be found include:

  • Setup > Accounting> Accounting List

  • Setup > Sales> CRM List

  • Setup > Company> Department

  • Setup > Company> Classes

For instance, the Department and Class picklist can be found in their respective locations under the Company Setup. However, other picklists will be in other locations.

Finding the ID of Custom Picklists

The IDs of custom picklists can be found under Customization > Lists, Records & Fields > Lists.

Note: If you can’t see the Picklist ID, please go to the section Exposing Picklist IDs

Here is an example Picklist. Please note the Internal ID column.

Populating NetSuite Picklist and Lookup Fields

You will need to pass the Internal ID to Breadwinner, rather than the Value. You can pass this as either a field which contains the Internal ID (formula fields work well for this, as they can be based on a Salesforce Picklist) or you can pass this to Breadwinner as raw data within the Custom URL itself without creating any fields (only an appropriate choice if you always use the same value).

Populating Standard Lookup Fields

Once you have the ID of a standard field, you can pass it to Breadwinner either as a field or as a value. As an example, here is a standard picklist, Department.

&department=department_api_field__c
&department="123"

And here is the Class field being populated.

&class=sales_order_class_api_field__c
&class="123"

Populating Custom Lookup Fields

NetSuite Custom Picklist and Lookup Fields present an additional layer of complexity. For NetSuite Standard Picklist and Lookup fields, simply passing the ID is enough. However, for custom fields, NetSuite requires that the field type be specified. And, thus, Breadwinner requires the field type to be specified. To specify the field type, we require additional information in the Custom URL.

Picklists have the type picklist and we require this to be in the Custom URL.

For Transaction Custom Fields

(for clarity, in NetSuite a ‘Transaction’ is a Sales Order, Estimate, or Invoice)

We designate a custom field on a transaction by starting the line of the Custom URL as

    &cf_

Which is followed by the type of the custom field (in this case a picklist) followed by the API name of the NetSuite field. Here is the theoretical construction.

&cf_type_netsuite_api_name=formula_field__c
&cf_type_netsuite_api_name="123"

For the sake of readability, we have added italics and bold to different parts of the query string. The italic text refers to the NetSuite field type which may be one of: picklist, string, integer, date, and so forth. The bold text refers to the NetSuite API Field name itself. Obviously, you will not need italics or bold in the actual formula when you create it.

An example query string in real-world usage, where a picklist is specified, might be

&cf_picklist_custbody_revenue=formula_field__c
&cf_picklist_custbody_revenue="123"

Where picklist refers to the NetSuite Field Type and custbody_revenue refers to a custom field on the Sales Order (or any transaction object) called “Revenue”.

For Line Item Custom Fields

NetSuite Transactions (Invoices, Sales Orders, Estimates and Credit Memos) all have line items. While there are several ways to pull data from Salesforce to populate that line item, the usual way to populate that line item in NetSuite is to use a Child Object (i.e. a related list) on the Originating Record in Salesforce.

We designate a custom field which is pulled from a child object and should go onto a line item by starting the line of the Custom URL as

&co_cf

Which is followed by the type of the custom field (in this case a picklist) followed by the API name of the NetSuite field. Here is the theoretical construction.

&co_cf_type_netsuite_api_name=formula_field__c
&co_cf_type_netsuite_api_name="123"

For the sake of readability, we have added italics and bold to different parts of the query string. The italic text refers to the NetSuite field type which may be one of: picklist, string, integer, date, and so forth. The bold text refers to the NetSuite API Field name itself. Obviously, you will not need italics or bold in the actual formula when you create it.

An example query string in real-world usage, where a picklist is specified, might be

&co_cf_picklist_custcol_revenue=formula_field__c
&co_cf_picklist_custcol_revenue="123"

Where picklist refers to the NetSuite Field Type and custcol_revenue refers to a custom field (column) on the Line Item called “Revenue”.