- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2019 04:54 AM
Hi,
This may already have been answered but perhaps my search keywords are wrong as all my searches have come up as unhelpful.
However, I was wondering if there was a way to "trigger" a UI Policy only when the form is not a new record rather it's an existing record whose details we are viewing.
Use case scenario:
Currently, I have a requirement to make the "From" and "To" fields as readonly (so as the prevent the user from changing the pre-populated values) when the form loads. The problem here is that using the "onload" event in the "When to run" tab also executes the policy when the form is blank and ready to be created a new record.
I would rather not run the policy when it's a new record. Is this possible? Hope my wording was sufficient enough to be understandable.
Thanks,
Nisar
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2019 05:07 AM
in the ui policy script part you can use the function g_form.isNewRecord() as condition and set the action using script in ui policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2022 06:15 AM
Here is a solution based on Created date that does not require scripting: