- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2017 03:23 AM
Hi everyone,
I have a requirement where I have run a fix script to set the state of Risk records that has #closed tag. This table has an email notification set up which will be triggered if the record is closed.
As this is an adhoc process, I need to ensure that the notification is not triggered once I run the Fix Script.
Is there a way to accomplish this without de-activating the notification?
Thanks
Regina
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2017 03:27 AM
Hi Regina,
If the emails are triggered via event, from a business rule. then can you use setWorkflow(false) in your fix script which will not let the BRs to run and hence no email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2017 03:27 AM
Hi Regina,
If the emails are triggered via event, from a business rule. then can you use setWorkflow(false) in your fix script which will not let the BRs to run and hence no email.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2021 03:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2017 03:40 AM
Thanks Anurag for the reply.
I was looking at the Business Rule and it seems that it handles not just the closing of records but other other states also. If I do setWorkflow(false) would this impact other process too?
BR code snippet:
if (current.state.changesTo('Closed')) {
gs.eventQueue("risk.closed", current, current.state, previous.state);
}
if (current.state.changes() && previous.state == 'Closed' && current.state =='Open') {
gs.eventQueue("risk.reopened", current, current.state, previous.state);
}
if (current.state.changes() && previous.state != 'Draft' && current.state =='Draft') {
gs.eventQueue("risk.rollbackToDraft", current, current.state, previous.state);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2017 05:16 AM
ctomasi any ideas?