- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2025 04:50 AM - edited ‎04-17-2025 03:15 AM
Hi sir,
1. If i have a added a Parent incident by using reference field - then show the error message on the form
2, If i am adding a child incident by using related list - then show the error message on the form
for 1st scenario - i have written OnChange cs- it works perfectly.
for 2nd scenario - i have written after BR - update - works fine. but when added a parent incident then update/save the incident then it was showing the AfterBR error message. it won't comes when adding a incident in the reference field. please suggest
@Ankur Bawiskar , @Kieran Anson. @AndersBGS
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 02:01 AM
it's a expected behavior
the business rule will run when you change the reference field and it's a change to parent field and the BR condition will satisfy and it will throw error
Also when the record is linked with parent via New/Edit the same BR will run as parent field is getting updated.
I believe this much info should help you.
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
‎04-17-2025 05:09 AM
@Ankur Bawiskar No sir, I am facing issue with After BR - update operation.
when added the Parent incident then saved the record - after saved reloading the form - then BR error message is showing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2025 05:10 AM
your business rule should be configured to run as Before Update
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
‎04-17-2025 05:12 AM
@Ankur Bawiskar , Can you please help me on Before Update, i have tried it- but not helping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2025 05:22 AM
please share what before update BR you configured, share screenshots
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2025 05:26 AM - edited ‎04-17-2025 05:44 AM
tried like
if(!previous.child_incidents && current.child_incidents){
gs.addErrorMessage('child Error');
current.setAbortAction(true);
}
Tried with 'parent_incident' and 'child_incidents' also @Ankur Bawiskar sir
i think the issue with both 'parent_incident' reference field and using same field value in BR also when adding 'child incident' by using related list.
But using 'child_incidents' it was not working
please suggest how to over come this issue