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

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


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?

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.