In the last post we check the Lightning:recordForm Which is a great tool. But there some limitation. Like we can’t prepopulate data in that. So today we will check another component, Lightning:RecordEdit form.
It is very good component, using this we can create edit page, check our custom validation and store the data into Salesforce without using single line of apex code.
Lightning:input field check the basic validation of data format and required field so we don’t need to worry about them. In case we get any system validation error it will show them using lightning:messages tag. It will also support dependent picklist out of the box so that also a nice feature.
After record save successfully we are using
lightning:navigation component to redirect to detail page. It is a new component launched recently. We use this to navigate to a given pageReference or to generate a URL from a pageReference.
So now we have many component out of the box which we can use to create basic Edit/Detail screens in Lightning.
Did you want to add anything here, let me know in comments section. Happy programming 🙂