+ Start a Discussion
Raghu NaniRaghu Nani 

How to open Visualforce page along with some parameters on click of button

Hi,
scenario is I created a button ,
on click of button I need to open VF page along with parameters
if I hard code url in button for community users not working
bcz of  community name in not there URL
is this any way to form URL dynamically

I tried URLFOR in Formula
{!URLFOR($Page.ProcurementDetailsPage, null, [Id=SomeId])}
I am getting Error Page.ProcurementDetailsPage does not Exist
Can any one help on this


Thanks,
raghu
Vickal GuptaVickal Gupta

Hi Raghu,

I believe you are looking VF page code. You can use below code to achieve your requirement.

<apex:outputLink value="{!$Site.Prefix}/ProcurementDetailsPage?Id={!SomeId}"> Procurement Details </apex:outputLink>
I hope this will help you.
Javwad AzeemJavwad Azeem
Hi Raghu,

You can use javascript on your button, here is the sample code:-\

window.open('apex/ChangeOrder?Id={!Opportunity.Id}','_parent')

Regards,
Javwad Azeem