You need to sign in to do that
Don't have an account?
Etienne DK
Get field values before save (lightning:recordForm // force:recordData)
I'm trying to intercept a record save, grab the new values and do stuff (eg validation or a callout) before saving the record.
As with most orgs we utilise on page layouts heavily, so they have to be leveraged in this solution.
Using force:recordData one can intercept the save but it does not support rendering, which means you can get the data before save but have to manually specify page layout fields (and security). Clearly not an option for orgs with multiple page layouts.
Using lightning:recordForm the page layouts (and security) are handled by the component (yay) but there is no way to access the field data, as per Page Layout, before save. Unless I'm missing something?
I did a StackExchange writeup with code examples but no luck so am trying here...
Any ideas?
lightning:recordForm force:recordData lds lightning data service
As with most orgs we utilise on page layouts heavily, so they have to be leveraged in this solution.
Using force:recordData one can intercept the save but it does not support rendering, which means you can get the data before save but have to manually specify page layout fields (and security). Clearly not an option for orgs with multiple page layouts.
Using lightning:recordForm the page layouts (and security) are handled by the component (yay) but there is no way to access the field data, as per Page Layout, before save. Unless I'm missing something?
I did a StackExchange writeup with code examples but no luck so am trying here...
Any ideas?
lightning:recordForm force:recordData lds lightning data service
MagulanDuraipandian
Check this out - www.infallibletechie.com/2018/06/how-to-validate-data-before-saving-in.html
Etienne DK
Perfect thank you.