Tiina Böös
09/16/2025, 12:40 PMCeligo AI
09/16/2025, 12:40 PMAI generated answer (using internal Slack threads):To populate a form using another record's fields, you can use SuiteScript or workflows in NetSuite. Here are two methods: 1. SuiteScript: You can use the
beforeRecordLoad
or afterFieldSourcing
event in a User Event Script. In this script, you can load the referring record, get the field value you need, and then set it on the new record. Here is a basic example:
javascript
function beforeLoad(context) {
if (context.type !== context.UserEventType.CREATE) return;
var newRecord = context.newRecord;
var referringRecord = record.load({
type: record.Type.SALES_ORDER, // replace with your record type
id: context.newRecord.id
});
var fieldValue = referringRecord.getValue({fieldId: 'customform'}); // replace 'customform' with your field id
newRecord.setValue({
fieldId: 'customform', // replace 'customform' with your field id
value: fieldValue
});
}
2. Workflow: You can create a workflow with a 'Set Field Value' action. The trigger for this action can be 'Field Sourcing' or 'Field Edit'. You can select the trigger field (the field from the referring record), define the criteria, and set the custom form field with your desired form to be set after field edit/sourcing. You can also add a custom field in the entity record to define the desired custom form then use that criteria to set the custom form field when that entity gets selected.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
09/16/2025, 12:40 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823913455
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821288943
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816223
Celigo AI
09/16/2025, 12:40 PM