简体   繁体   中英

How to do something during the “Delete” user event on NetSuite?

I've tried this:

if (context.type == context.UserEventType.DELETE) {
     log.debug('afterSubmit', 'afterSubmit');
 }

But in vain, the record just be deleted and no execution log appears. How to do something during the "Delete" user event?

How is the record being deleted? I mean using UserInterface, UserEvent or Map/Reduce etc. Since, as per NetSuite User-Event is not emitted from another UserEvent.

That being said, if record is deleted from UserEvent of some other script, you won't get UserEvent of deleted record.

Although you can try using Workflow action scripts and set its Contexts to UserEvents.

afterSubmit does not fire when a record is deleted. You will need to use beforeSubmit

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM