Create a Demand task automatically when Demand goes to screening state.

Chandler2
Tera Guru

It has to be a business rule I believe. Can someone share some example code?

1 ACCEPTED SOLUTION

5 REPLIES 5

Miguel Donayre
ServiceNow Employee
ServiceNow Employee

I would recommend using Flow designer to do this. It would easier to manage and require less coding.

 

 

 

 

find_real_file.pngfind_real_file.png

 

Hi,

Thanks, I got the answer.

Questions:

1. I see that it can be done with a before and after BR both. So if one has to do with a BR then which is the correct way and why? Can I use one BR to create multiple records, each with different values?

 2. while doing with a flow, will I be able to create more than one record, each with different values?? While populating demand task fields, I have to concatenate Demand field values and/or Demand field value with a string and populate in one demand task field. How and where to put that code?

3. What should I select in the Run trigger? I read the docs but not clear to me.

 

You can with the business rule, and I would make them After business rules. You want to create them once the state changes. You can also create multiple demand tasks. You would just have to code it. I don't have any saved to share... it's been a while since I used this method.

For the flow designer, YES, you can. You can even set up creating a task to happen only when the task above it is complete. All you have to do is add the create task action after the 1st one. 

find_real_file.png

The trigger can be tricky. You will have to read each one of the explanations to see which one fits your need.

find_real_file.png

I usually use an updated one when I know something will change, like your example of the state. But if I need to create something when some are created ONLY, I will add the create trigger.

There are some good videos on the doc that help explain it, and there is some training to help with flow designer 

https://nowlearning.service-now.com/lxp?id=overview&sys_id=14111ca61bf21c10dad363d07e4bcb3b&type=cou...

https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/administer/flow-designer/concept/...

 

 as far as combining two fields, you can try to use the script option for that field 

find_real_file.pngfind_real_file.png

 

 

I hope that helps you out.