Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Set Mandatory Filed False on Form Update/Saved

Not applicable

I want to make a mandatory field false want when the form is updated/saved.

 

if the "work notes" field is mandatory, it should false mandatory condition when the form is updated/saved (only for that particular transaction in the client, meaning only until the value is changed in the form and updated/saved after the record is updated it should no longer be mandatory.

 

Please share your valuable suggestions

1 REPLY 1

Rutuja Khalate
Tera Guru

Hi @Community Alums ,

 

You can check the current ui action (Save or Update on which you want to apply this validation) in the onSubmit client script and set the fields mandatory based on conditions like below:

var action=g_form.getActionName();

if(action=='your_action_name'){

g_form.setMandatory('field_name', true);

}

if (g_form.getValue('field_name') == '')
return false;

Please mark this response as correct or helpful if it assisted you with your question.

Best Regards,
Rutuja Khalate