Which one I should choose? UI policy or client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 12:38 PM
I would like set some fields visible condition. I have to use the script to set up visible condition if I use UI policies to call other tables. I would like to know is there any performance difference use the script in UI policies and use the script in client script?
Thanks,
Faye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 12:39 PM
My rule of thumb is to always go UI Policy when I can. I only use client scripts if I have to call by role, which UI Policy does not allow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 01:09 PM
I agree. UI policy first take anytime, client script is always the last resort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 02:07 PM
1) Always UI policies will have higher priority because UI policies will execute after form loading where as Client scripts will execute with form loading so it will leads to some performance issues.
2) One more advantage with UI policies is no need to write coding for simple operations like making fields mandatory , read only and for hide and show the fields.
3) Main advantage in UI policies is we can define the order of execution. where as in client script we dont have that feature.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 02:47 PM
Hi Faye,
Use UI Policies Instead of Client Scripts
When possible, consider using a UI policy instead of a client script for these reasons:
- UI policies have an Order field to allow full control over the order in which client-side operations take place.
- UI policies do not require scripting to make a field mandatory, read-only, or visible.
Note: UI policies execute after client scripts.