I want to write the pop warning when problem task is not complete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 04:02 AM
In the problem record RCA state should not move Fix in progress when Problem task is not completed. I want the pop waring using business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 04:11 AM
Check this OOTB Prb properties:
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 04:25 AM
Hi @PRAGHATIESH S ,
Could you please elaborate more on the requirement like what you want to show in the pop up message and on what condition ?
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 07:31 AM
You can use below script in your business rule
(function executeRule(current, previous /*null when async*/) {
// Check the condition: RCA state is 'Fix in Progress' and Problem task state is not 'Closed'
if (current.state == 'Fix in Progress' && current.problem_task.state != 'Closed') {
// Display a warning message
gs.addErrorMessage("Cannot move RCA state to 'Fix in Progress' when the Problem task is not completed.");
// Prevent the record from being saved
current.setAbortAction(true);
}
})(current, previous);
Please mark my answer correct/Helpful if it helps.