To make additional comments mandatory when state set to canceled (should run in both views)

rishabh31
Mega Sage

Dear Team,

 

In the Incident record, when the field State is set to 'Canceled', then want to make the field 'Additional Comments (comments)' mandatory and restrict the form submission/updation/save and throw an error message at top.

 

This should work in both views (Portal view and Standard form view)

 

I tried through client scripts, UI Policies but no luck.

 

Kindly help with the steps and script to get this resolved.

 

Thanks

 

 

17 REPLIES 17

Danish Bhairag2
Tera Sage
Tera Sage

Hi @rishabh31 ,

 

Could u please share as to what u have currently done?

 

Thanks,

Danish

 

Hi @rishabh31 ,

 

Thanks for sharing the info. Hope u kept the UI type as ALL in both scenarios. The steps for creating either a UI policy or Client script will be pretty straight forward.

 

In ur UI type u can keep condition such as 

 

State Changes to Cancelled 

 

N under UI Policy Action create a new entry stating Comments mandatory true visible true.

 

Try keeping the Order of the UI policy to some Odd number so that it does not collide with any other UI policy.

Same goes with Client script as well 

 

Thanks,

Danish

 

@Danish Bhairag2 

 

I have created something same as told by you but not working properly as it allows to save/update/submit the particular incident record.

 

rishabh31_0-1703174832653.png

O/P

rishabh31_1-1703174866910.png