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
JohnDuraiJohnDurai 

creating section in details tab page layout using LWC

Hi - can someone suggest how to create new section using LWC under details secion ?
Best Answer chosen by JohnDurai
ANUTEJANUTEJ (Salesforce Developers) 
As you mentioned you need to implement in LWC I tried checking and I was able to find the below implementations, can you please try checking them:

>> https://salesforce.stackexchange.com/questions/311081/an-lwc-for-sldss-expandable-section

>> https://www.infallibletechie.com/2020/04/lightning-accordion-expand-and.html

Both of them are using lightning-accordion-section you can check more details regarding this tag in this link https://developer.salesforce.com/docs/component-library/bundle/lightning-accordion-section/example

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.

All Answers

ANUTEJANUTEJ (Salesforce Developers) 
Hi John,

I think you can use the lightning__RecordPageEnables a component to be used on a record page in Lightning App Builder in XML and place it on the related tab so that it can be useable in that tab, on placing the lwc on related list it would be visible as below screenshot after drawing and dropping in the correct place:

>> https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_configuration_tags

This link has all the possible targets you can use in the XML you can check this out.

User-added image

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
Ashish Kumar YadavAshish Kumar Yadav
Hi JohnDurai

Please Follow this link you can easily create the section.
https://sfdcmonkey.com/2020/12/02/create-expand-collapse-sections-salesforce-lightning/

if it is work for you please mark as the best answer.
JohnDuraiJohnDurai
Hi @Ashish Kumar Yadav - I am expecting similar kind of output but this needs to be in Lightning web components, is there any code/article availble in LWC. Thanks!
ANUTEJANUTEJ (Salesforce Developers) 
As you mentioned you need to implement in LWC I tried checking and I was able to find the below implementations, can you please try checking them:

>> https://salesforce.stackexchange.com/questions/311081/an-lwc-for-sldss-expandable-section

>> https://www.infallibletechie.com/2020/04/lightning-accordion-expand-and.html

Both of them are using lightning-accordion-section you can check more details regarding this tag in this link https://developer.salesforce.com/docs/component-library/bundle/lightning-accordion-section/example

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
This was selected as the best answer
JohnDuraiJohnDurai
Thanks  @ANUTEJ  it helps and solved
ANUTEJANUTEJ (Salesforce Developers) 
Glad to know it helped John:)
Jeff Callahan 9Jeff Callahan 9
John - Can you post a link to your solution?