Difference between script include and BR

jaiku
Giga Contributor

Difference between script include and BR

8 REPLIES 8

sirishasatya
Kilo Expert

Business rule runs on server side. Reusable server side scripts can be stored in script include.


script include runs only when called by other scripts.


script included are reusable codes. You can call script includes form client script also..



Instead of script include you can write global business rules, But global business rule is loaded for every page in the system (generally very inefficient). Global business rules should be avoided whenever possible because of this inefficiency and you should use Script Includes instead (which are loaded only when they are specifically called)


Dubz
Mega Sage

Hi Jai,



If you run through the scripting in Service Now training modules on the developer portal they should give you a pretty good idea of what different methods are used for.



https://developer.servicenow.com/app.do#!/training/article/app_store_learnv2_scripting_istanbul_intr...  


Rajesh Mushke
Mega Sage
Mega Sage

Hi Jai,



if your query is answered, please mark my response as correct , so that this will be helpful to other community users.



Let me know if that answered your question. If so, please mark the response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list. Thank you


How To Mark Answers Correct From Community Inbox




Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

anandjedidiah
Tera Contributor

Script include will execute only when it is called, but the Business rule will always run by triggers.