Can a Business rule be triggered from another business rule

varunkumar1
Tera Contributor

Hi All,

Could any one please tell me if one business rule can be triggered from the other business rule?

please share your thoughts.

Thanks

Dhileep Keshapagu

10 REPLIES 10

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Varun,



Can you provide some additional details on what you are trying to accomplish? Details are encouraged.


Shishir Srivast
Mega Sage

Hi Varun,



Not sure what is the business use case to call Business Rule, but don't think it's a good practice to call Business Rule from another Business Rule, instead you can create a script include and call whenever it's needed. The name of the script include must match the name of the function for the script include to work properly.


Script-Include-u_ciRefQual.png


To call the function, use a script like this: var ref = u_ciRefQual(current.location);


Like if I have 3 business rules written on a table. BR1, BR2 and BR3


I want to call BR3 while BR1 is executing. And then call BR2 while BR3 is executing.



Do we have any syntax for calling one BR from the other BR. If yes, please share.



If this is not possible, they please let me know.


Thanks for the update.   You cannot call business rules in such a way. This case sounds like you need to create a script include and put your common logic there so that you can call a script include from any business rules per your req.


Reference:


http://wiki.servicenow.com/index.php?title=Script_Includes#gsc.tab=0