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
Tasia Demuth 4Tasia Demuth 4 

Add Products in Lightning


I am having some trouble getting the Lightning stylesheets to stick for the opportunity product Add Product action. I have a visualforce page and custom controller that I use to create an opportunity. Once the opportunity is created, one is redirected to add products to the opportunity. Right now, the redirect works, but sends the user into Classic to add the products and then is redirected back to Lightning. 

Is there a way to keep everything in Lightning? Below is the code for the visualforce page. 

Thanks in advance for your help!

<apex:page lightningStylesheets="true" controller="OppCreateController"> <apex:slds > <!-- >> KO << flow:interview name="Testflow3" interview="{!OppCreate}" finishLocation="{!URLFOR($Action.OpportunityLineItem.AddProducts,OppId)}" / --> <flow:interview name="CreateOpportunityFlow" interview="{!OppCreate}" finishLocation="{!BackToOpp}"> <apex:param name="AccountId" value="{!$CurrentPage.parameters.Id}"/> </flow:interview> </apex:slds> </apex:page>
Alain CabonAlain Cabon
Hi Tasia,

The new Winter 18 Release now presents users with the "Add Products" screen after they click "Save". To enable this feature be sure you do the following: from Setup, enter Opportunity Settings in the Quick Find box, then select Opportunity Settings. Enable Prompt users to add products to opportunities.

Lightning - Save and Add Products on Opportunity Button

Did you have enabled this feature at first?

Tasia Demuth 4Tasia Demuth 4

Thanks for the response Alain! I did have this feature selected. 

I believe that the reason the add products is not prompting is because I have a flow that creates the opportunity and then a redirect to the opportunity record page. Therefore, I never press 'Save' and the prompt is never released. I am wondering if there is anyway to redirect to the prompt? 

Let me know! And thank you again for your help!


Igor IevsieienkoIgor Ievsieienko
Hello Tasia.
Have you found any workaround? I have the same issue.
Tasia Demuth 4Tasia Demuth 4
Hi Igor, Currently, we just removed the AddProducts from the opp creation and require them to add the products after the opportunity is already created. So, our workaround is avoiding the issue. But, I do have it on my list to revisit this at some point. I would like a smoother experience for our sales team. Sorry I couldn't be of more help. Tasia Tasia DeMuth Business Applications Administrator Tel 303-345-9125 Cell 720-224-8036