Removing attachment does not trigger change business rule

thisisauniqueus
Giga Expert

Hi,

I have created a form with lets say 2 check boxes and defined a business rule that run on insert and update. The business rule constrains the user to upload files for the number of check boxes checked. so far so good but when the user update the record and remove an attachment, does not make any change to the form values; the update business rule does not run.. changing the form values triggers the update BR just fine.

Pl guide me what i am doing wrong here...

Regards

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

The reason for this is because managing attachments is operating on the sys_attachment table, not the incident table (or whatever your business rule is watching.) If you want to make an update to that record, place a business rule on sys_attachment and use the table_name and table_sys_id fields to determine the target record information.



My preference would be to use an AFTER business rule that includes the Delete field set to true.


Business Rules - ServiceNow Wiki


Business Rules Best Practices - ServiceNow Wiki  


View solution in original post

5 REPLIES 5