Juan Ma Concari
10/10/2025, 7:47 PMCeligo AI
10/10/2025, 7:47 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems that you can apply a refund to a record via SuiteScript, even if it's not appearing on the static sublist apply of the Customer Refund. Here's how you can do it: 1. You can use the
N/record Default Values to create a customer refund and apply transactions to it. This allows you to set default values for the fields in the record.
2. You can also use Dynamic Mode. However, it might not work if the number of sublist rows exceeds the limit.
3. For unapplying a payment, you would need to load the payment, iterate its sublist of invoices, uncheck them, and save the payment record.
4. If you're trying to auto-populate a custom field before the first creation save, you might need to do this on the afterSubmit in a User Event on CREATE. Transform, save, and in afterSubmit do your "thing".
5. You should be able to use the apply sublist on the customer refund to find out which record(s) it applies to. An invoice is not usually a choice since refunds apply to transactions representing payments. But you could get to the invoice with a search/query from the transactions on the apply sublist.
Please note that you usually want to avoid after submit scripts that modify the current record, as they impact performance more than necessary since they require you to save the record again.
******
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
10/10/2025, 7:48 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.863342464
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.860839903
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84588629
Celigo AI
10/10/2025, 7:48 PM