difference between client script and ui policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 10:32 AM
difference between client script and ui policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 10:36 AM
Hi Sasmita,
you can find everything in this blog post.
A Race between UI Policy and Client script
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 11:27 AM
Hi Sasmita,
Apart from what Rajesh has suggested in post above. In simple terms, both UI Policy & Client Script are almost similar only thing is scripting is involved in Client script, also client scripts excutes first when compared to UI Policies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 12:00 PM
now i will explain best practices,
UI Policy :
1. ui policies are alternate to client scripts.
2. Always use Ui policy for making fields read-only and Mandatory & Hiding.
Client Scripts vs. UI Policies
Client Scripts and UI Policies both execute client-side logic and use the same API. Both are used to manage forms and their fields. When developing an application, how can you decide which client-side script type to use? Use this table to determine which type is best suited to your application's needs:
Criteria | Client Script | UI Policy |
---|---|---|
Execute on form load | Yes | Yes |
Execute on form save/submit/update | Yes | No |
Execute on form field value change | Yes | Yes |
Have access to field's old value | Yes | No |
Execute after Client Scripts | No | Yes |
Set field attributes with no scripting | No | Yes |
Require control over order of execution | *Yes | Yes |
*Although the Order field is not on the Client Script form baseline you can customize the form to add it.
UI Policies execute after Client Scripts. If there is conflicting logic between a Client Script and a UI Policy, the UI Policy logic applies.
Refer :
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2017 01:48 PM
Hello Sasmita,
Hope your query is been answered , so please close this thread.
Then only this will be helpful for other community customers.
Let me know if that answered your question. If so, please mark my 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. Visit How To Mark Answers Correct From Community Inbox
Thanks in Advance............
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke