navigate the lightning component by on click custom button -- w3web.net

How to navigate from one component to another component on click button after Change Opportunity Stages (Mark Stage as Complete) in lightning component Salesforce | how to navigate lightning component on click button after changed the opportunity StageName Value in Salesforce lightning component

Hey guys, today in this post we are going to learn If Opportunity Stages Change then check the StageName Value through Javascript after that navigate the lightning component by on click custom button in lightning Salesforce

Real time scenarios:- If Opportunity Stages (Mark Stage as Complete) then check the value and navigate from one component to another component on click button in Salesforce.

Files we used to navigate the lightning component on click button

navigateStageCmp.cmp Lightning Component It is used to create a Navigation Button to navigate from one component to another component in lightning.
navigateStageCmpController.js JavaScript Controller File It is hold Javascript click function to check the StageName and navigate the component from one to another component.
navigateStageCmpHelper.js JavaScript Controller Helper File It is hold Javascript Helper stageCompToNaviagate action to check the StageName and navigate to respective component as per Mark Stage as Complete.
naviagateStageCtrl.apxc Apex Class Controller It is used to get the current record Id from Opportunity Object through Apex class method.
qualificationStageCmp.cmp Lightning Component It’s navigate on click button if StageName is Qualification
needsAnalysisStageCmp.cmp Lightning Component It’s navigate on click button if StageName is NeedsAnalysis.

Live Demo

navigate the lightning component by on click custom -- w3web.net

Other related post that would you like to learn in lightning component.

  • Find the below steps

Create Lightning Component

Step 1:- Create Lightning Component : navigateStageCmp.cmp

From Developer Console >> File >> New >> Lightning Component

navigateStageCmp.cmp [Lightning Component File]

Create JavaScript Controller

Step 2:- Create Lightning Component : navigateStageCmpController.js

From Developer Console >> File >> New >> Lightning Component >> JavaScript Controller

navigateStageCmpController.js [JavaScript Controller]

Create JavaScript Helper

Step 3:- Create Lightning Component : navigateStageCmpHelper.js

From Developer Console >> File >> New >> Lightning Component >> JavaScript Helper

navigateStageCmpHelper.js [JavaScript Helper File]

Create Apex Class Controller

Step 4:- Create Apex Class : naviagateStageCtrl.apxc

From Developer Console >> File >> New >> Apex Class

naviagateStageCtrl.apxc [Apex Class Controller]

Create Lightning Component:- For Qualification StageName

Step 5:- Create Lightning Component : qualificationStageCmp.cmp

From Developer Console >> File >> New >> Lightning Component

qualificationStageCmp.cmp [Lightning Component File]

Create Lightning Component:- For Needs Analysis StageName

Step 6:- Create Lightning Component : needsAnalysisStageCmp.cmp

From Developer Console >> File >> New >> Lightning Component

needsAnalysisStageCmp.cmp [Lightning Component File]

Further post that would you like to learn in LWC

Create a Flyout Account, It will help you to grow make more money for a better living.

If you think you and your family members also like to earn money in additional time, then go this link. In this site, you can earn money for the lifetime at low effort. To Earn Unlimited Everyday With This Trick, Sign Up Free.. Get Started for Free

Check Out:- Earn Unlimited Everyday With This Trick:- Click Here

 

FAQ (Frequently Asked Questions)

How do I navigate from one component to another component in Salesforce?

To navigate from a Lightning component to another, specify the component name using componentDef .

How do you navigate in Aura component?

To navigate to a page or component, use the navigate() method in lightning:navigation. This approach is a substitute for a navigateTo* event, and both are supported. To generate a URL in your component, use the generateUrl() method in lightning:navigation to resolve the URL.

How do you close quick action in lightning component?

To close a quick action panel, usually in response to completing or canceling the action, run $A. get('e. force:closeQuickAction'). fire(); .

Can we use LWC in quick action?

LWC supports two types of quick actions: Screen Actions. Headless Actions.

Related Topics | You May Also Like

Hi, This is Vijay behind the admin and founder of w3web.net. I am a senior software developer and working in MNC company from more than 8 years. I am great fan of technology, configuration, customization & development. Apart of this, I love to write about Blogging in spare time, Working on Mobile & Web application development, Salesforce lightning, Salesforce LWC and Salesforce Integration development in full time. [Read full bio] | The Sitemap where you can find all published post on w3web.net

Leave a Comment