I have a lightning component which shows the same page layout for all the record Types currently but now I want to differentiate between the recordtypes and want to show the same layout in the component for one recordtype Id but for other recordType Id, I want to show the standard pagelayout. So, which element would help me achieve that. Any pointers would be appreciated.
2 Answers
you can just create two different page layout and assign the page layout to record type based on your condition. You don't need to do any custom development.
You can use lightning:recordViewForm
component. This component handles different record types on its own. We just need to pass record id to it.
You can use force:recordEdit
It will handle all conditions for edit.
-
I found out that we can only use Lightning:output using this Lightning:recordViewForm component. My desire is to get the user to fill in the input layout fields and then save it Commented May 8, 2019 at 11:09
-
-
-
So you want to create record.. I thought you want to edit record Commented May 8, 2019 at 12:03
-