UI policy conflict
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 06:42 AM - edited 05-30-2024 08:40 AM
Hello friends,
I have created 2 UI policies on catalog form:
1. When the "Region" is "APAC" then the "Department" field should be mandatory, Visible.
2. When the "Region" is "USA" then the "Department" field should be mandatory, Visible.
In both the cases, reverse if false = true.
On the catalog form, when we select "Region = APAC" or "Region=USA" then UI policies are working fine.
The problem I am facing is, when I select "Region=APAC" and then I change to "Region=USA" then it works. But if I change back to "Region=APAC" without saving or refreshing the record, then the "Department" field becomes invisible.
There are some other UI policy actions as well in both UI policies, so we cannot combine 2 UI policies into single with OR condition.
Please suggest how to remove this conflict.
Thank you
Asmita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 06:52 AM
Hi @Asmita7
You can write them in one UI policy instead of Two UI Policies
In the Ui policy write condition as :
Region = APAC" or "Region=USA"
Then UI policy action as :
"Department" field should be mandatory, Visible
Thanks and Regards
Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 08:42 AM
Hi Sai,
Thank you for reply.
There are some other UI policy actions as well in both UI policies, so we cannot combine 2 UI policies into single with OR condition.
Please suggest some other approach.
Thank you once again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 09:21 AM
Hi @Asmita7
Then You can UI policy Script may help you out
In that you can use
g_form.setVisible
g_form.setMandatory
Thanks and Regards
Sai Venkatesh