- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 08:42 PM
i'm not sure how to create run script activity in flow , need some guidance on this
alternatively, I tried with after Business rule with script as below, it's just setting flow context to cancel and i still can view the workflow from show workflow option. How do i remove the workflow completely?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 08:15 PM
that Related link is not visible to all
what's the point in this requirement if the workflow is already cancelled via your script
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
12-17-2024 08:15 PM
that Related link is not visible to all
what's the point in this requirement if the workflow is already cancelled via your script
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
12-19-2024 12:20 AM
that show workflow link is still visible to end users. my br just setting workflow context to cancelled. is there a way to remove that workflow completely?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 03:49 AM
you can update the UI action condition but it's an OOB UI action
Also why end users are seeing that button?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 08:57 PM - edited 12-16-2024 08:58 PM
Can we do like this, I have used a Before Insert BR on my custom table and running this script....
var rec = new GlideRecord('u_customTable');
rec.addQuery('number', current.number);
rec.query();
if (rec.next()) {
var workflow = new global.Workflow();
workflow.cancel(rec);
gs.info("Existing Recors is " + rec.sys_id);
}