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
Ramon PereiraRamon Pereira 

Capturing Opportunity Id created in custom page

Hello,

 

I have to create a page to create a oportunide this same page and should be able to enter the User Products for the opportunity. I had the idea of creating a screen User wizard who first creates the opportunity in the next screen and it chooses the products, but how do I capture the id of opportunidade that I created in the previous screen?

 

thank you

vishal@forcevishal@force

By screens, are you referring to separate pages? If yes, then pass the id from the first one to the other as a url parameter.

 

Something like:

 

On your first page, button click to "Add Products" can open this page:

 

https://na7.salesforce.com/apex/addProducts?oppId={!Opportunity.Id}

 

The bold part can either be a merge field or a variable that is holding the Opportunity Id.

Ramon PereiraRamon Pereira

But on the first screen will create opportunidade. Id like to capture this opportunity we created in the first screen.

Ramon PereiraRamon Pereira

I'm actually trying to do a Master Detail Insert. For my demand is to put the screen opportunidades products in the same screen creation opportunities.