on the Customer Credit Note record page, if i click Refund button, it will create a Customer Refund record. I need to fetch a value from CreditNote record and set at Customer Refund record. I am doing UserEvent (beforeSubmit). on this how can i write the script that when the Refund button is clicked?
Could anyone please help me?
b
battk
03/07/2023, 12:16 PM
im guessing the customer credit note is a renamed credit memo
battk
03/07/2023, 12:17 PM
in which case refund button opens up the customer refund page, give a chance to the user to make their own changes
battk
03/07/2023, 12:18 PM
and then the before submit is triggered after clicking the save button
battk
03/07/2023, 12:18 PM
that leaves a chance during the beforeLoad of the customer refund to set your field
battk
03/07/2023, 12:19 PM
you can also do it in the client script or the before submit if you really want
battk
03/07/2023, 12:19 PM
all approaches can use the value in the created from field to figure out what the credit memo is and then you can lookup whatever you are looking for