Business Rules with "insert","update", "delete", "query" fields set to false. Is it possible?

ashwindatre
Kilo Contributor

I can see there are lots of OOTB business rules that have all "insert","update", "delete", "query" fields are set to false. I thought the whole purpose of using a business rule is to enforce rules against database CRUD operations, then how can these conditions be false?

How does a business rule work in such condition?

In what situations such BR conditions are used?

regards,

Ashwin

1 ACCEPTED SOLUTION

chrisshellhamme
Tera Expert

Display Business Rules do not have insert, update, delete, or query set.   Also there could be a case where a Business Rule is being called from another script, or possibly a scheduled job and you do not want it to run when an action is taken on a record.



Regards,



Chris


View solution in original post

6 REPLIES 6

chrisshellhamme
Tera Expert

Display Business Rules do not have insert, update, delete, or query set.   Also there could be a case where a Business Rule is being called from another script, or possibly a scheduled job and you do not want it to run when an action is taken on a record.



Regards,



Chris


Agree with Chris.   You need to look at the "When" attribute along with insert, update, delete, and query.   If the When = display, then there is a UI Policy that hides the crud fields.


Dennis R
Tera Guru

Just to expound on what Christopher said above, there are scheduled jobs [sys_trigger table] that kick off business rules if the job ID is RunScriptJob and the job context contains a line:


fcScriptName=Business Rule Name



I don't know that this is documented anywhere officially, but if you look in the sys_trigger table for the job named Autoclose Incidents, you'll see arguably the most obvious example of this functionality being used to execute the script (a business rule) that autocloses tickets after some amount of time defined by the glide.ui.autoclose.time system property.



Hope this helps,


--Dennis R


thanks everyone for the replies.



@Dennis, any idea why this "Autoclose Incidents" does not show up in Scheduled Job [sysauto_script], but is seen on "sys_trigger" table?


where is this defined?


It is triggering a BR having when=after and CRUD fields set to false.