How to stop OOB notification through Flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 03:26 AM
Actually, when the first-level approval is triggered, an 'approval notification' should be sent. For the second-level approval, the 'approval request email notification' needs to be restricted from triggering without modifying OOB the 'approval request' notification. how can we restrict from flow.
I have user this script " gs.eventQueueCancel('event_name', current, current.sys_id); " in the flow designer
but its giving an error like >>>> Error: Cannot read property "sys_id" from null,Detail: Cannot read property "sys_id" from null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 04:00 AM
So what's your question
1) you want to stop OOB notification
OR
2) you are facing error in your script in flow and you want to fix it?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 09:06 PM
I want to stop notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 09:34 PM
In Flow Designer, the error occurs because current is not automatically available as it is in Business Rules or Script Includes. Flow Designer uses its own data model, and variables like current need to be explicitly referenced or derived from the flow's data. To resolve the issue, you must explicitly refer to the record associated with the flow using Flow Designer's data pill syntax.
Here’s how you can update your script to work within Flow Designer. Use the appropriate record reference from the flow (e.g., fd_data.<record>). Replace <record> with the variable name corresponding to the record in your Flow Designer. For example, if you're working with an approval record, use the exact variable that represents it. This ensures you correctly access the sys_id of the record.
Below is the script without comments, adjusted for Flow Designer:
var record = fd_data.<record>;
if (record) {
gs.eventQueueCancel('event_name', record, record.sys_id);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 10:09 PM
Hi @Sailakshmi Budd ,
There is one OOB BR which runs on approval table to notify the approver, you need to amend this.
You can create one flag called approval_level and set it through flow designer like for first level set 1 for and level set 2 and so one.
In BR check if approval_level 1 or 0 then send else skip the approval.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------