Not applicable

@Sandeep Rajput Thank you!

ServiceNow already has an OOB Business Rule "Check related Problem Task closure" which checks for all PTask closure for an problem.

 

I have added below(Your) code to set the flag value in OOB business rule:

 

var problem = glideProblemTask.problem.getRefRecord();
problem.<name of your flag>='true'; //replace with your flag name
problem.update(); //Update is taking place on the problem record.

 

View solution in original post