Create incident task while creating incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 03:01 AM
Hello,
I can successfully create an incident in ServiceNow by sending in a REST message to the incident table.
I need to also create an incident task for the incident being created, I know I can write a business rule to do this on the ServiceNow end but is there a way to create the task while creating the incident itself?
Any help is much appreciated!
Regards,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 03:11 AM
Perhaps you can take the use of a workflow to trigger and do the stuff for you?
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 03:26 AM
Hi Karan,
If you are looking for a standard task. I would prefer to use execution plan. You may choose Parent table as incident and child table as Incident Task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2017 01:06 AM
Hi Ketan,
I have tried creating an execution plan but I don't see the tasks being created in the incidents.
I'm very new to ServiceNow so I don't have much information on execution plans.
Could you expand on the answer so as to point me in the right direction.
Thanks!
Regards,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 03:51 AM
Hi Karan,
To create incident task while creating an incident you can define a workflow with tasks in it which can be triggered on creation of incident also you can use below piece of code to execute you workflow
var w = new Workflow();
wfSysId = w.getWorkflowFromName("Your_workflow_Name");
w.startFlow(wfSysId, current, current.operation());
Regards,
Sagar Sharma
Hit like, Helpful or Correct depending on the impact of the response