0

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 2

0

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.

0

You can use lightning:recordViewForm component. This component handles different record types on its own. We just need to pass record id to it.

https://developer.salesforce.com/docs/component-library/bundle/lightning:recordViewForm/documentation

You can use force:recordEdit It will handle all conditions for edit.

6
  • 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
  • @user3920709 Please check force:recordEdit Commented May 8, 2019 at 11:57
  • I think I can use force:createRecord Commented May 8, 2019 at 12:00
  • So you want to create record.. I thought you want to edit record Commented May 8, 2019 at 12:03
  • Ah, sorry my bad. Yes, I want to create a new record Commented May 8, 2019 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .