Prevent Redirecting to Another Page After Saving Record Using SuiteScript

NetSuite’s default functionality may redirect the page to another, such as automatically redirecting to the Sales Order after saving a Dropship or Special Purchase Order.

To stay on the same record without redirection, a User Event Script can be used.

const afterSubmit = (scriptContext) => {
            redirect.toRecord({
                    type: scriptContext.newRecord.type,
                    id: scriptContext.newRecord.id
                });
        }

Leave a comment

Your email address will not be published. Required fields are marked *