Does business rules still fire when creating a project from template?

Patrick DeCarl1
ServiceNow Employee
ServiceNow Employee

I have a simple insert business rule with no condition on project table that doesn't get fired if user created a project from template. Is this by designed or bug?

1 ACCEPTED SOLUTION

arun_vydianatha
ServiceNow Employee
ServiceNow Employee

Hi Patrick



The BRs don't fire while creating projects from templates. The reason why we have turned off is - if template is too big, our recalculation BR fires on insert of each task and the whole system might end up spinning for lot of time.



So we had turned it off by design.



Thanks,


Arun


View solution in original post

11 REPLIES 11

Chuck Tomasi
Tera Patron

Business rules get triggered on database operations. The limiting factor is the condition. There may be a condition on the business rule that says "don't run if this is being done from a template."



I recommend turning on business rule debugging *System Diagnostics> Debug Business Rule (details)" and try it again, then observe the output at the bottom of the screen to see which rules ran, which were skipped, etc.



Debugging Tools Best Practices - ServiceNow Wiki


Hey Chuck,



This BR is custom and has no condition. It's on insert and after.



Since the Template code is SNC, are you able to see if they have setWorkflow(false) on insert?


This BR is custom and has no condition. It's on insert and after.


Doesn't matter.



Since the Template code is SNC, are you able to see if they have setWorkflow(false) on insert?



Not that I know of. That would break all kinds of things.



What did you see in the log after applying the template and saving the record?


Only display BRs are trigger. No before or afters. debug output below.



Screen Shot 2016-09-29 at 9.32.29 AM.png