Custom Fields
This article applies to NetSuite custom fields, which are not a part of the standard set of fields available in NetSuite by default. These custom fields in NetSuite are generally created by an admin/dev and are located on entity, transaction body / line, and item fields. These fields then become part of the sync process and are regularly retrieved just as standard fields are. Breadwinner for NetSuite makes it simple to retrieve your custom field data from NetSuite for use in Salesforce.
You can see a list of available NetSuite custom fields in the ‘Custom Fields’ section of the Breadwinner for NetSuite tab. Breadwinner can sync NetSuite custom objects with Salesforce and can keep them updated over time.
Creating custom fields from NetSuite in Salesforce using Breadwinner for NetSuite is actually quite simple. Let's get started by opening Breadwinner for NetSuite in Salesforce and click "Custom Fields" (Step 1) below.
- Select the category of field (Step 2), such as Entity, Transaction Body, Transaction Line Item, or Item.
- Select the type of field (Step 3), such as Sales, Purchase, Item Fulfillment, Customer Payment or Vendor Payment.
- Click the button "Fetch Sales Custom Fields" (Step 4), whereby Breadwinner will reach out and retrieve your current NetSuite schema and identify the custom fields that exist in the category/type you've selected.
- In the table of fields (Step 5) indicate which Breadwinner object(s) you would like to deploy the custom field(s) to in Salesforce. You can process more than one field at this time if you prefer.
- Now just click the "Create xx Custom Fields" button shown in (Step 6)
By clicking 'Create Custom Fields' Breadwinner will create the custom Salesforce fields based on the custom NetSuite fields you have selected.
The new Salesforce custom field label will be the same as the NetSuite custom field label, however, the custom field API name will be a bit different. The custom field API name in NetSuite always starts with one of the following prefixes:
- “custentity_”, for Entity Fields
- “custbody_”, for Transaction Body Fields
- “custcol_”, for Transaction Line Item Fields
- “custitem_” or "custcol_"for Item Fields
This process will create the custom field(s), however, due to Salesforce limitations and to respect your organization security, Breadwinner will not expose the new custom field to users, and it does not have permissions applied.
Breadwinner can’t populate the data in the new custom fields created unless the user who set up Breadwinner and scheduled the syncs (aka running user) has the necessary permissions on the object and its fields.
So, in order to provide permissions, you can either use Salesforce Profile level permissions or create a Permission Set and assign it to desired users who need access to the field.
For example, we have created a permission set called “NetSuite Custom Object Permissions” and given custom object and field permissions in the following screenshot.
Data in Custom Fields created in Breadwinner for NetSuite, may not be immediately available. Do note that for historical data, the full records including their new custom fields will be retrieved during our weekly sync process. However for new transactions, the data will be populated as the transactions occur. By using the link "check to see if this record has been updated" on Breadwinner object records, you can retrieve the new values immediately. If you need to accelerate the process of retrieving historical data this can also be done by utilizing tools in the Troubleshooting section of Breadwinner for NetSuite.
The Transaction Line Item custom fields on a transaction record page (e.g., Sales order) are sorted based on the NetSuite field API name.
To sort them, you can change the API names of these Line Item custom fields in both NetSuite and Salesforce by following the steps below.
- In NetSuite Org, change the API name of the Transaction Line custom field that you want to sort. For example, if you have two custom fields named "Warranty Start Date" and "Warranty End Date", their API names in NetSuite are "custcol_start_date" and "custcol_end_date" respectively. To sort them, you can rename them to "custcol_1_start_date" and "custcol_2_end_date". This will ensure that "Warranty Start Date" displays first and "Warranty End Date" comes next on the Line Item table.
- In Salesforce, if the two custom fields mentioned above already exist with previous API names, then navigate to the "NetSuite Line Item" custom object and follow one of the following options:
- Update those fields with new names, such as "ncf_col_1_start_date" and "ncf_col_2_end_date".
- Delete the existing fields and re-create them from the Breadwinner tab by following step 3.
- If the above two custom fields do not exist in Salesforce, then follow the doc Creating Custom Fields using Breadwinner and Providing Field Permissions. To sync those custom field values, Restart the respective object sync from the Breadwinner --> Troubleshoot-->General tab.