Issue in Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2025 06:49 AM
Hi,
I have created a "Reopened" checkbox with a read-only condition in the Incident record and set its default value to false.
Scenario:
When the incident is in any state up to Resolved, the Reopened checkbox is unchecked (false). Once the user wants to reopen the incident (i.e., the state changes from Resolved to New, In Progress, or On Hold), the Reopened checkbox should be automatically checked (true) and set to read-only. Additionally, I want the Resolution Notes and Resolution Code fields to be cleared when the incident is reopened.
I have implemented this in Business Rule. But not getting solution. Can anyone help me on this?
Thanks,
Abirami
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2025 07:23 AM
you can use before update business rule
State Changes from Resolved
AND
State Changes to New OR State Changes to In Progress or State Changes to On Hold
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
current.u_reopened = true;
current.close_code = '';
current.close_notes = '';
})(current, previous);
Also use onLoad client script to check if the field Reopened = true then make it readonly
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2025 01:38 AM
I suggested to use business rule and onLoad client script
what did you try so far and what didn't work?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 01:22 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 12:42 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader