function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chance Hoskins KUChance Hoskins KU 

Can custom lightning components be added to standard page layouts

I would like to be able to create a record using the standard page layout, but I would like to also allow the addition of a custom component to that page layout. 

Currently , it seems that the only way to get custom components is to create a completely new component and code in the individual fields into that component. I don't like this solution because it makes it difficult to maintain.

However, if I wanted to require information from my custom component, I have no way of doing that with a standard creation/edit page layout.

Is it possible to add a custom component to a page layout, or even add a page layout to a custom component so I don't have to hard code the fields?
NagendraNagendra (Salesforce Developers) 
Hi Chance,

You can use force:recordView  ​https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_force_recordView.htm to place an entire record view (dictated by page layout) into a custom component. Requires SLDS to view properly, and links/hovers only work in LEX. You can also use force:recordEdit https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_force_recordEdit.htm if you want to be able to create/edit a record, instead.

Hope this helps.

Kindly mark this as solved if the information was helpful.

Thanks,
Nagendra.