ANS-1239 · CUSTOM FIELDS, RECORDS & FORMS

How to Automatically Set Sales Rep on NetSuite Transactions from a Custom Address Field?

Learn how to configure NetSuite to automatically assign a sales representative to a transaction based on a custom field value defined on the shipping address.

Short answer

To automatically set the Sales Rep on NetSuite transactions from a custom address field, first create a custom 'Other Record Field' on the Address record type, linking to Employee and filtering for Sales Reps. Then, use either a Transaction saved mass update or a workflow with an 'After Record Submit' trigger to populate the transaction's Sales Rep field using the formula {shippingaddress.*yourcustomfieldID.ID}.

Scenario

NetSuite users often need to associate a specific sales representative with a client's shipping address. When a transaction is created for that client using a particular shipping address, the sales representative linked to that address should automatically populate the Sales Rep field on the transaction. This ensures accurate sales attribution and streamlines data entry.

Solution

To implement this solution, follow these steps:

  1. Create a custom "Other Record Field" on the Address record type. Configure the field as follows:Record Type: AddressType: List/RecordList/Record: EmployeeOn the "Applies to" subtab, check "Apply to all custom address forms: Yes".On the "Sourcing & Filtering" subtab, set "Filter Using: Is Sales Rep" and ensure "Is checked: Yes".

  2. Assign a sales representative to a shipping address on a client record by populating this newly created custom field.

  3. Create a sales transaction for that client, selecting the shipping address where the custom sales rep field has been populated. Save the transaction.How to Update the Transaction Sales Rep Field:Option 1: Transaction Saved Mass Update

  4. Create a Transaction saved mass update.

  5. Configure the mass update to set the Sales Rep field. The value should be a formula:

{shippingaddress.*yourcustomfieldID.ID}

*Important Note*: The .ID suffix is critical. NetSuite expects the internal ID of the employee for the Sales Rep field. Without .ID, NetSuite might attempt to enter the employee's name, leading to an unexpected error.

  1. Execute the mass update. It can be scheduled to run periodically as required.Option 2: Workflow

  2. Create a new workflow on the transaction record.

  3. Add a "Set Field Value" action within the workflow.Set the trigger to "After Record Submit". (Note: Triggers like "After field sourcing" or "After field edit" may not function reliably because the shipping address might not be fully committed to the database at those earlier stages. While "After Record Submit" ensures data integrity, users might manually enter a sales rep before the workflow executes, potentially causing confusion.)Set the Field to "Sales Rep".Set the Value to a formula:

{shippingaddress.*yourcustomfieldID.ID}

*Important Note*: The .ID suffix is critical. NetSuite expects the internal ID of the employee for the Sales Rep field. Without .ID, NetSuite might attempt to enter the employee's name, leading to an unexpected error.Add a Condition to this action:Field: Sales RepCompare Type: EmptyThis condition ensures the workflow only populates the Sales Rep field if it is currently empty.Option 3: Combination of Saved Search and CSV ImportThis method can also be utilized for bulk updates, though it involves exporting data via a saved search and then re-importing with updated values via CSV.

Expert NetSuite Support

Need help with this NetSuite issue?

Custom Fields, Records & Forms consulting and configuration support

Talk to a consultant