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
SFDC_2706SFDC_2706 

help on class and vf page....

Hello all,

   below is my question...please help me out in calling vf page after selecting one record from list... :

 

¢Create a VF page and VF component.
¢In the 1st page, get all the Opportunities in a <apex:selectList>.
¢On select of the Opportunity, go to the 2nd page where you can edit/save selected opportunity's StageName, Close Date.

 

 
Best Answer chosen by Admin (Salesforce Developers) 
AnushaAnusha
Use onChange event for that SelectList

<apex:selectList value="{!oppName}" onChange="navigateToOpp(this.value)">
<apex:SelectOptions value="{!OppNames}" />
</apex:selectList>


function navigateToOpp(OppId){
window.open('/apex//secondVF?Id='+OppId,'_self')
}