question around the Customer refund record, i want...
# suitescript
m
question around the Customer refund record, i want to script the auto population of my custom field Billing contact before first creation save, this field lives on the cus ref rec, i want to get the contact rec details from the invoice the cus refund is getting transformed off. How do i do that as I can't seem to reach the applyingtransaction value (comes back blank) and I can't do a search to locate the inv because the customer refund record doesn't have a usable internal id for me to plug into the search criteria, needs to be saved before I can call that int id. Any guidance will be appreciated or what this process is called, calling the current record before it's fully saved
n
Just a hunch but I suspect you need to do this on the afterSubmit in a User Event on CREATE. Transform, save and in afterSubmit do your "thing".
m
nice, I'll give that a try, much appreciated for your input @NElliott
👍 1
b
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
usually you want to avoid after submit scripts that modify the current record, they impact performance more than necessary since they require you to save the record again