We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

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

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.

*************************************************************************************************************
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/dratulgrover [ Connect for 1-1 Session]

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

Harish Bainsla
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
Giga 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