ajrey77
03/06/2025, 5:19 PMCeligo AI
03/06/2025, 5:19 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems that you can't directly set the check # field to blank when creating a customer refund via SuiteScript. However, you can use an afterSubmit User Event script to modify the check # field after the record has been created and saved. Here is a sample code snippet that you can use as a reference:
javascript
function afterSubmit(context) {
if (context.type !== context.UserEventType.CREATE)
return;
var refund = context.newRecord;
var checkNumberField = 'tranid'; // replace with the actual field id for check #
var checkNumber = refund.getValue(checkNumberField);
if (checkNumber) {
var recordId = refund.id;
var recordType = refund.type;
var record = record.load({
type: recordType,
id: recordId
});
record.setValue(checkNumberField, ''); // set check # to blank
record.save();
}
}
This script will load the newly created customer refund record, set the check # field to blank, and then save the record. Please replace 'tranid'
with the actual field id for the check # field.
******
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/06/2025, 5:19 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825239778
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815342963
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815019
Celigo AI
03/06/2025, 5:19 PM