1.UI Plocy is not working

nameisnani
Mega Sage

Hi Team , 

 

 

under closure information ,  I have created 2 custom fields . please check screenshot .

nameisnani_0-1720673199290.png

 

when we click on ' COMPLETE' or States changes to ' closed ' these two custom become mandatory . and without entering any data , form should get save .

nameisnani_1-1720673229739.png

I have created UI Policy for this ,

in the when to apply > CHANGES , option is not there .

nameisnani_2-1720673302325.png

 

nameisnani_3-1720673323045.png

 

 

 

Result :- 

 

 

But it is not working  still form got saved 

 

nameisnani_5-1720673420803.png

 

nameisnani_6-1720673420757.png

 

nameisnani_7-1720673419922.png

 

 

 

can anyone please help me here , what mistake i have did , why it is not working . please help me with steps and screenshot for better understanding.

 

 

5 REPLIES 5

SN_Learn
Kilo Patron
Kilo Patron

Hi @nameisnani ,

 

Create a data policy, it should work.

** Update your field name accordingly.

 

SN_Learn_0-1720674969364.pngSN_Learn_1-1720674979735.png

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

MahamKali Badug
Tera Contributor

Hi @nameisnani 

You can also try one more option that is bringing those two fields in to the closure dialog model, So when you click on complete the model pops up and also shows those two fields as mandatory to fill. It will be easier.

MahamKaliBadug_0-1720676908349.png

 

nameisnani
Mega Sage

Hi @SN_Learn 

 

let me check

OlaN
Giga Sage
Giga Sage

Hi,

The issue here is that UI policys react to fields that are on the form.

When you use a UI action that changes the fields (which this complete button does) the UI policy is evaluated after the change is already in place. So the fields become mandatory after the fields have changed.

 

So the UI policy will work, but only if you manually change the fields in the form, then it will set the fields to mandatory.

In this case you can combine the UI policy with a business rule, that checks if the fields are mandatory before setting the record to complete.

No scripting required, just use the condition builder to have the business rule run before the record is changed to complete, and your two custom fields are empty, and then it should prevent the submit.