Q Hoang
02/26/2026, 1:52 PMCeligo AI
02/26/2026, 1:52 PMAI generated answer (using internal Slack threads):The document number on a customer refund is automatically generated by NetSuite and is based on the check number field. It is not directly editable. However, you can override this number using a SuiteScript after submit user event. Here is a code sample that was shared in the threads:
javascript
let documentLookup = search.lookupFields({
type : search.Type.CUSTOMER_REFUND,
id : recordID,
columns : ['transactionnumber']
});
let values = {};
values.tranid = documentLookup.transactionnumber;
record.submitFields({
type : record.Type.CUSTOMER_REFUND,
id : recordID,
values : values
});
In this code, a lookup is performed to get the transaction number of the customer refund. This value is then used to set the tranid field of the customer refund record. Note that the tranid field is being set, not the transactionnumber field.
Please ensure that you are using the correct field (tranid), and that you are loading the record independently, as you cannot directly edit the record object passed in the parameters of a user event.
******
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
02/26/2026, 1:52 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825317442
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808838
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.807800353
Celigo AI
02/26/2026, 1:52 PM