Which one will runs first UI Policy action or UI Policy script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2019 10:44 AM
I believe UI Policy Scripts run first am i right????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2022 07:13 AM
Don't confuse UI Policy Scripts with Client Scripts. They are not the same thing.
"UI Policy scripts use the client-side API to execute script logic based on whether the UI Policy condition tests true or false. Use UI Policy scripts to create complex conditional checks or to take actions other than setting field attributes (mandatory, read-only, or visible).
The scripting fields for UI Policies are only visible in the Advanced view. To enable the scripting fields, select the Run scripts option.
- The Execute if true script executes when the UI Policy condition tests true.
- The Execute if false script executes when the UI Policy condition tests false."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2023 10:04 AM
If condition evaluates to true, UI Policy Action executes first then UI Policy Script.
Tested myself by setting a field mandatory via ui policy action on a condition and setting the same field not mandatory in the script execute if true part. The field was not mandatory after the ui policy is executed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2023 07:35 AM
Hello There,
I have tested it
UI policy script will run first then UI policy actions will run
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2024 03:39 AM
UI Policy action executes before the UI policy script.
You can test it by creating UI policy on the form for a particular field, e.g. category on incident form. In that, write UI policy script and create one UI Policy action. Then, go to Preferences->Developers->Click on JS Log and Field watcher, make it true. Then, you can Field Watch the category on incident form. You will see the execution order clearly in Field Watcher.
You can refer to the screenshot attached herewith.