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
ssoftwaressoftware 

Custom lightning component nesting a standard component

Hi All,

I developed a custom lightning component to use in a Salesforce community and it is working fine. Salesforce communities have quite a few standard lightning components. I am particularly interested in using the Record Detail standard component in my custom component. Can someone let me know if it is possible, and if yes, what is the proper syntax to nest it in my custom component? I could not find anything about this so far in the documentation. 
James LoghryJames Loghry
I believe what you want is the force:recordView component, which is a standard lightning component.  For an example of using it, see the following link: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_force_recordView.htm
ssoftwaressoftware
Hi James, thanks for your reply. The Record Detail component in the communities templates has more functionality than the force:recordView component. Thus I would to use/extend it instead but could not find any doc regarding this. I believe this and other community components are not made public by Salesforce.
Burjiss PBurjiss P
Hey ssoftware, ddi you figure out a way for this? All i want to do is depending on values entered in the record detail fields, I want to dynamically calculate values in other fields. (Before saving). So I want to basically add javascript somewhere to make that happen.
ssoftwaressoftware
No, I have not. A workaround seems to be to create a onload javascript which executes after the user has logged in. In the javascript, you can do a redirect to the record detail page by passing the appropriate record id to it.