How do I prevent the project from being closed after all project tasks are closed

lexveldkamp
Tera Contributor

Last check have to be done by Project Office. They would be the one to close the Project.

1 ACCEPTED SOLUTION

Sulabh Garg
Mega Sage
Mega Sage

Hello,

Please check the below thread, you will the solution here.

Restrict Project closure when all Project tasks are closed

 

Please Mark ✅ Correct/helpful, if applicable, Thanks!! 
Regards
Sulabh Garg

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

View solution in original post

10 REPLIES 10

Sulabh Garg
Mega Sage
Mega Sage

Hello,

Please check the below thread, you will the solution here.

Restrict Project closure when all Project tasks are closed

 

Please Mark ✅ Correct/helpful, if applicable, Thanks!! 
Regards
Sulabh Garg

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Hey @lexveldkamp ,

Any follow up questions you have on my response, Else please mark the relevant response as correct and helpful so that this thread can be closed.

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

var target= new GlideRecord("pm_project_task");
target.addQuery("parent",current.getUniqueValue());
target.addActiveQuery();
target.query();
if(target.hasNext()){
gs.addInfoMessage("my message");
current.setAbortAction(true);
}

 

Is the right solution !!

Looks good.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader