Nuri Ensing
07/01/2025, 2:28 PMCeligo AI
07/01/2025, 2:28 PMAI generated answer (using internal Slack threads):Yes, you can change the customer of an opportunity record with SuiteScript even after the opportunity is created. This can be done by loading the record, setting the new value for the customer field, and then saving the record. Here is a sample code snippet:
javascript
var record = nlapiLoadRecord('opportunity', opportunityId);
record.setFieldValue('entity', newCustomerId);
nlapiSubmitRecord(record);
In this code, opportunityId
is the internal id of the opportunity record you want to change, and newCustomerId
is the internal id of the new customer you want to set.
Please note that this operation might unlink the opportunity from any related sales order, as the sales order might still be linked to the old customer.
******
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
07/01/2025, 2:28 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831616223
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828683555
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827696264
Celigo AI
07/01/2025, 2:28 PM