UI policy conflict

Asmita7
Tera Expert

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

 

3 REPLIES 3

SAI VENKATESH
Tera Sage
Tera Sage

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

 

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.

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