UI Policy best method to update existing UI Policy to apply to new records & not existing records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2023 11:58 PM
Hello there, I have a simple request to update an existing UI Policy with new conditions. When updating the UI Policy – this works for new records, good, but it affects existing records, where now the variable shows in existing records, when it should not. I have seen many posts with different resolutions so am curious to find out what is the best method to make this change, nowadays?
New conditions hi-lighted in yellow:
UI Action:
Also has existing Run script;
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2023 05:54 AM
Hi @Winnie P ,
Generally UI Policy will works for both On change and Onload. If you need to work UI Policy only for new records then you have to give condition using created date field or use g_form.isNewRecord() on script then execute your ui policy actions.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2023 09:27 AM
Hi @Winnie P ,
As you updated the UI policy means some thing change on form side, there may be new fields added on form but old record doesn't have those new field and UI policy's OR condition not executing the OR condition for new fields on old records.
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution