0
votes

Can someone explain me how to fetch the record from netsuite (eg. if we click on the save button of inventory form, it should capture the record and display) using suite script.

thanks in advance.

1
where do you want to display the record and what actions you want to perform? could provide some example?Avi

1 Answers

0
votes

You have to write a USER EVENT Script and deploy that script in the record (ex: customer record)

In the afterSubmit function of the script you can use scriptContext to get and display the value.

function afterSubmit(scriptContext) { log.debug('scriptContext',scriptContext.newRecord); //You can see the record info on debug logs }

If you want to get the data for some validation purposes you can use beforeSubmit function.