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
Ap30Ap30 

lwc sample code

Hi All,
I have to create 3 components.On clicking a button in component 1, it should create a reecord and go to component 2 and on clicking button in component 2, it should move to component 3. Component 1 and 3 have master detail relationship. So how to get the relationship field value in component 3 to create the record. I'm new to Lightning web components.(learning)
Any help is appreciated.
Suraj Tripathi 47Suraj Tripathi 47
Hi,

In LWC to move from one component to other or to move to another website, site, etc. You have to use navigation mixin.
To get to know more about navigation mixin follow the below links:-

- https://www.sfdcpoint.com/salesforce/navigation-service-in-lwc/
- https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_navigate

Please mark it as Best Answer if it helps you.

Thanks & Regards
Suraj Tripathi


 
Ap30Ap30
Thanks Suraj. How to get the value of relationship field in component 3 which is created in component 1.