darrenhillconsulting
03/26/2026, 4:13 PMCeligo AI
03/26/2026, 4:13 PMAI generated answer (using internal Slack threads):In SuiteScript 2.1, you can set the 'Primary Subsidiary' of a customer in a NetSuite OneWorld account with the MultiSubsidiary Customer feature turned ON by using the
record.setValue method. However, please note that you cannot change the primary subsidiary of a customer record once they have transactions associated with them.
Here is a simple example of how you can do this:
javascript
require(['N/record'], function(record) {
var customerRecord = record.load({
type: record.Type.CUSTOMER,
id: 'yourCustomerId'
});
customerRecord.setValue({
fieldId: 'subsidiary',
value: 'yourSubsidiaryId'
});
var recordId = customerRecord.save({
enableSourcing: true,
ignoreMandatoryFields: true
});
});
In this example, replace 'yourCustomerId' with the ID of the customer you want to update, and 'yourSubsidiaryId' with the ID of the subsidiary you want to set as the primary subsidiary.
Please note that this code should be executed in a server-side script. Also, make sure that the user executing the script has the necessary permissions to update customer records.
******
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
03/26/2026, 4:13 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.871704161
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.871032715
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.865112364
Celigo AI
03/26/2026, 4:13 PM