1

I'm currently working on a migration to Lightning where we have some Visualforce pages, specially in Opportunity.

We are currently facing an issue when trying to open the standard Add Products or Edit Products page, since this are Visualforce pages we haven't been able to open the Lightning Modal to edit the products as this one.

enter image description here

That modal is from the standard lightning page, we've tried opening the add products with

{!URLFOR($Action.OpportunityLineItem.AddProduct,Opportunity.Id)}

{!URLFOR($Action.OpportunityLineItem.EditAllProduct,Opportunity.Id)}

Those two open the classic page to add or edit products

enter image description here

The issue is when trying to save or cancel it goes to a blank page with this error in the console.

enter image description here

In the OpportunityLineItem buttons and actions, I saw there is a Standard action called MultiAdd which is the one that opens the lightning modal, but tried this code and doesn't work:

{!URLFOR($Action.OpportunityLineItem.MultiAdd,Opportunity.Id)}

Anybody has a workaround for this? Is this a bug in the platform or is there a configuration missing or something?

2
  • Did you try using the 3rd argument to the URLFOR ? [RetURL=URLFOR($Action.Opportunity.View,Opportunity.Id)] - see related question (albeit Apex)
    – cropredy
    Commented Mar 21, 2023 at 1:17
  • Tried but didn't work. I ended up using the lightning related lists and use the lightning standard modal instead. Commented May 18, 2023 at 11:24

0

You must log in to answer this question.