Shelby Owens
02/18/2026, 2:17 PMCeligo AI
02/18/2026, 2:17 PMAI generated answer (using internal Slack threads):To include which invoices the payment was originally applied to in a multi-select field when the void button is selected, you would need to use SuiteScript. Unfortunately, there is no built-in functionality in NetSuite to track this information without scripting. Here's a high-level approach on how you could achieve this: 1. Create a custom field on the Customer Payment record to store the original invoices. This field should be a multi-select field that references the Invoice record type. 2. Write a beforeSubmit User Event script that triggers on the Customer Payment record. This script should capture the invoices that the payment is applied to before the payment is voided. You can use the
getCurrentSublistValue method to get the invoice values from the 'apply' sublist.
3. In the same script, set the values of the custom field you created in step 1 with the invoice values you captured.
Here's a simplified example of what the script might look like:
javascript
function beforeSubmit(context) {
if (context.type === context.UserEventType.DELETE) {
var record = context.newRecord;
var invoiceIds = [];
var lineCount = record.getLineCount({sublistId: 'apply'});
for (var i = 0; i < lineCount; i++) {
var invoiceId = record.getSublistValue({sublistId: 'apply', fieldId: 'internalid', line: i});
invoiceIds.push(invoiceId);
}
record.setValue({fieldId: 'custbody_original_invoices', value: invoiceIds});
}
}
Please note that this is a simplified example and may need to be adjusted to fit your specific needs. Also, this script assumes that the custom field you created on the Customer Payment record is named 'custbody_original_invoices'.
******
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/18/2026, 2:17 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.824890137
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819091856
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81640625
Celigo AI
02/18/2026, 2:17 PM