Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Problem

Anantha27
Mega Guru

In the problem when the priority is critical or high I need to create a PTASK automatically.

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Anantha27 

2 ways

- Either create BR After and in that you can insert a new task or

use Flow designer to create task like we have in change.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Harish Bainsla
Kilo Patron
Kilo Patron

Hi @Anantha27  create business rule for reference check below link just make changes of table as per your requirement

https://www.servicenow.com/community/itsm-forum/create-problem-automatically-from-incident-if-priori...

 

 

Mark Manders
Mega Patron

Use the Flow designer for this. Trigger on priority and just use the 'create record' action. No need to do this through a script.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

VaishnaviShinde
Kilo Sage

@Anantha27 ,

 

You can create after insert or update Business rule:

Add below conditions

VaishnaviShinde_0-1729505001747.png

 

Add the below code in script section:

var prjTask = new GlideRecord('problem_task');
prjTask.initialize();
prjTask.YourfieldName = Value; (You can add you fields and their values.)
prjTask.insert();

// You can add your fields value in this syntax as well prjTask.setValue("fieldName",value);

 

Please Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Vaishnavi Shinde