- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2022 04:13 AM
Hi,
I need to run transform map for 200 records in requested items table, and also I need to run for them specific workflow where I have 14 tasks for each of them. So where should I put a script and how the script should looks like?
for now I just tried to run Workflow using just "StartFlow" like below:
var wflw = new Workflow();
wflw.startFlow(wflw.getWorkflowFromName('SAP RITM Integration'), current, 'insert');
unfortunately it's not working.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2022 04:16 AM
Hi,
you should be using onAfter transform script for this
OR
in your script update the current object with target
var wf1 = new Workflow();
wf1.startFlow(wf1.getWorkflowFromName('SAP RITM Integration'), target, 'insert');
Regards
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
05-05-2022 04:16 AM
Hi,
you should be using onAfter transform script for this
OR
in your script update the current object with target
var wf1 = new Workflow();
wf1.startFlow(wf1.getWorkflowFromName('SAP RITM Integration'), target, 'insert');
Regards
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
05-05-2022 04:36 AM
It's working, didn't think about that, Thank you 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 10:38 PM
Hi Ankur, What is the target table for workflow is it "wf_workflow"