0

I have a visualforce page where I want to pass the Contact Id into the visualforce page. This is because I have a flow imbedded in the vf page, which needs a contact id to create Opportunity COntacts. How do I pass the Contact Id into this flow? I tried using {!$CurrentPage.parameters.conid} but that does not work....

See my code below- thanks:

<apex:page standardController="Opportunity" RecordSetVar="Opportunities">
   <flow:interview name="CreateOpportunity">
     <apex:param name="var_AccountId" value="{!$CurrentPage.parameters.accid}"/> 
     <apex:param name="var_CurrentUserId" value="{!$User.Id }"/> 
     <apex:param name="var_ContactId" value="{!$CurrentPage.parameters.conid}"/> 
   </flow:interview> 
</apex:page>
  • 1
    Are you passing a parameter called 'conid' to this VF page? From where are you calling this page? – AslamK Aug 11 '15 at 16:19
  • I am on the Contact Detail Page, and have created a custom 'Create new Opportunity' button which calls this page. I' new to vf so not sure how to pass the conid parameter... – Marchandoj Aug 12 '15 at 8:28
0

If you or on the Contact detail page and you have a button that opens the VF page then you can configure the button to pass the Contact id.

Make sure you are using the content source of the button as URL

/apex/yourVFPageName?conId={!Contact.Id}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.