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.

Business rule help required on Catalog task Active field

Lucky1
Tera Guru

Hello all,

 

I have modified an already existing BR and the BR is giving info Messages what I have written but not changing the Active field value to false. Please help me.

Lucky1_0-1745309422735.png

 

 

Regards,

Lucky

 

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Lucky1 try the following and see if it works

task_rec1.active=false; //false without quotes
task_rec1.update();

 

View solution in original post

5 REPLIES 5

J Siva
Kilo Patron
Kilo Patron

Hi @Lucky1 
After task_rec1.active = false add below line.

task_rec1.setWorkflow(false);

May i know why you are directly updating the active field instead of updating the state field as closed complete/incomplete?
Regards,
Siva

Sandeep Rajput
Tera Patron
Tera Patron

@Lucky1 try the following and see if it works

task_rec1.active=false; //false without quotes
task_rec1.update();

 

Yes Sandeep,

It's working now.

I will come back.

 

 

Regards,

Lucky

@Lucky1 Please mark the response accepted solution.