function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HariPHariP 

Save button not working in lightning:recordEditForm with lightning:inputField

Hi,

I have lightning:recordEditForm with lightning:inputFields and lightning:button type Submit.

There is a vRule on couple fields to be required when status = 'Complete'. On the record, if I set the status to 'Complete' and click Save, it is throwing validation errors and displaying error at fields. Without entering those required fields, if I change the status back to NOT Complete and click "Save" button, nothing happens.

Save button action not being invoked unless I key in something in the fields errored on first save attempt.

How to clear field validation errors on change on the status field and allow Save action again?

Shubham_KumarShubham_Kumar
Hi Hari

Can you post a screenshot of your validation error?
NagendraNagendra (Salesforce Developers) 
Hi Hari,

Are you using actual object Validation Rules, or doing the validity checks in the lightning component itself? If you move the validity checks into the component and deactivate the Validation Rules, that would probably be a good workaround

Please let us know if this helps.

Thanks,
Nagendra