How to trigger workflow from table record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2020 06:25 AM
Hi,
I have created a workflow using custom table, wants to trigger the workflow on each new entry in that table?
How to do that?
Thanks,
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2020 06:29 AM
Hi,
You need to create a business rule that is launched on insert record on that custom table and trigger the workflow with this code:
var wflw = new Workflow();
wflw.startFlow(wflw.getWorkflowFromName('give the workflow name'), current, 'update');
Hope it helps!
Joaquín
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2020 06:29 AM
Hi Vijaykumar,
workflow automatically will get started whenever you create new entry in table, and if you mention any condition in workflow condition then,when that condition is met then only workflow will get started.
regards,
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2020 06:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2020 06:30 AM
Hi,
by default workflow will trigger when new record is created on your custom table
Ensure the new workflow runs on your custom table
No need of business rule
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