How to setAbortAction in a custom action in a flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-01-2019 11:52 PM
I want to abort the insertion of a record if some condition is met in the flow,
I did add the flow logic and everything and i made a custom action and added a script into it, but i can't seem to figure out how to setAbortAction since current.setAbortAction(true); returns this error
Error: Cannot convert null to an object.,Detail: Cannot convert null to an object.
Any help would be much appreciated, Thanks š
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-02-2019 12:18 AM
Hi,
current.setAbortAction(true) works in before business rule; not sure whether it would work in flow
Mark ā
Correct if this solves your issue and also mark š Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-23-2020 09:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-23-2020 09:42 PM
Hi,
Refer the below link that will help you
https://www.servicenowguru.com/scripting/stopping-record-submission-servicenow/
Please mark it correct and helpful
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-24-2020 06:28 AM
Thank you. the link above applies when using either client-side script or server-side business rule to abort an update. However this doesn't answer OP's original question, if those same script would work in a flow.