i want to trigger flow through ui action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 05:46 AM
i want to trigger flow through Ui action. when ever i click on button the flow should trigger.
I have copied the code snippet of the flow and pasted it in ui action.
what should i mention in
can you please let me know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 06:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 06:22 AM
Hello @Akash Kajro,
The inputs['changed_fields'] in your snippet is where you pass data to the flow. For example, if your flow expects sys_id, short_description, and assigned_to as inputs, you would define it like this:
inputs['changed_fields'] = {
sys_id: current.sys_id, // assuming 'current' is available in the UI action context
short_description: current.short_description,
assigned_to: current.assigned_to
};
Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 08:12 PM
yes it's possible.
what error you received when you ran above script?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 06:57 AM
Hi @Ankur Bawiskar i am not to trigger the flow on the default view..But the Ui Button is not working on Hr agent workspace view