1

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.

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.