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
akkkakkk 

is it possile onClick on Account Record in LWC after that show all related to contact records in new Navigation tab ?

Hi all,

is it possile to onClick on Account Record in LWC after that show all related to contact records in new Navigation tab ?


Thanks
AKKK
 
Abhinandan MishraAbhinandan Mishra
Yes, it is possible to show related contact records in a new navigation tab on the click of an Account record in a Lightning Web Component (LWC). Here is an overview of the steps:
  1. Create a custom Lightning Web Component that will display the related contact records.
  2. Add an event listener to the component that listens for the click event on the Account record.
  3. In the event listener, get the record Id of the Account record that was clicked and use it to query the related contact records.
  4. Display the related contact records in the custom Lightning Web Component.
  5. Use the createRecord method of the Lightning Navigation Service to create a new tab for the custom Lightning Web Component.
  6. Pass the record Id of the Account record to the custom Lightning Web Component as a parameter so that it can use it to retrieve the related contact records.
  7. Deploy the custom Lightning Web Component to your sandbox org and test it.
Note: This is a high-level overview of the steps involved in the process. A more detailed implementation would depend on your specific requirements and the tools you are using to develop the LWC.
Abhinandan MishraAbhinandan Mishra
If this works, feel free to give it a thumbs up 😀.
akkkakkk
Hi Mishra,

I hvae completed the code its working good..


Thanks
akkk