Introduction:
NetSuite is a robust platform for managing customer records, and it offers various methods to interact with these records, including copying them. However, identifying whether a customer record was created via the “Make a Copy” action using native SuiteScript or workflows can be challenging. In this article, we’ll explore an alternative solution that involves creating a custom field in the customer record and populating it during record creation. This approach allows you to distinguish between regular and copied customer records.
The Challenge:
NetSuite’s native workflows and SuiteScript do not provide direct capabilities to identify whether a customer record was created through the “Make a Copy” action. This can make it difficult to implement specific logic or automation for copied records.
The Alternative Solution:
To overcome this limitation, we can create a custom field within the customer record and use it to track whether the record was created via the “Make a Copy” action. Here’s how you can implement this solution:
Step 1: Create a Custom Field:
- Navigate to Setup > Customization > Lists, Records, & Fields > Entity Fields > New.
- Create a custom field with an appropriate name, such as “Copied From.”
- Set the field type to “Text” or another appropriate type.
Step 2: Populate the Custom Field:
Fill the custom field with the customer’s ID during the ‘beforeLoad’ view context.
Step 3: Check the field is empty in customer record creation.
In the customer creation context before submit action check this field is not empty. That means the customer creation via make a copy context.