Restrict Child Incidents related list from creating more than 1 Child

randallames
Tera Contributor

Hello all,

 

I have a requirement to restrict each Parent Incident to 1 Child Incident. If there is already a Child Incident in a Parent then an error message displays when attempting to use the "New" and "Edit" buttons on the related list saying "This Incident already has 1 Child Incident."

 

Thank you!

Incident.jpg

1 REPLY 1

Slava Savitsky
Giga Sage

Create a business rule for Incident table that would:

  1. run when Parent field changes
  2. execute a GlideRecord query to check if there already is a child incident for that parent
  3. abort the update transaction if that is the case