Need Usecases of Business rule & client script

harver31
Tera Contributor

Hi All

 

Can anyone provide the use-cases for Business rules, UI policy, Client script?

 

Thanks in advance

1 ACCEPTED SOLUTION

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @harver31 

 

This might be helpful

 

https://developer.servicenow.com/dev.do#!/learn/courses/washingtondc/app_store_learnv2_scripting_was...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@harver31 Here are some of the use cases for each of the items.

1. Business rule: A business rule is a Server side script which runs whenever any CRUD (Create Read Update Delete) operations takes place on the server side. 

User Case: You can use these scripts to do the following

(i). Set some values on a record before it gets stored in database (Before Insert/Update business rule)

(ii) Set some values on a record which belongs to other table after a record is stored in a database (After Insert/Update /Delete business rule)

(iii) Set some values on a record which belongs to other table after a record is stored in a database (After Insert/Update/Delete business rule)

(iv) Filter records on the basis of some conditions before they are shown to the user (Query business rule)

(v) Pass some values from Server side to client side (Display business rule)

 

UI Policy: UI Policy runs at client side (in browser) and make fields read only, mandatory and visible

User case: Can be used on the forms to make fields read only, mandatory and visible

 

Client Script: Runs at client side (in browser) apart from providing the functionalities which UI Policy provides (make fields read only, mandatory and visible) it also helps fetching data from the server side using GlideAjax.

Use Case: (i)Can be used on the forms to make fields read only, mandatory and visible

(ii) Can be used to fetch Data from server side

(iii) Can run on Form as well as list (onCellEdit)

 

Hope this helps.