You need to sign in to do that
Don't have an account?
Mahesh Tandan 6
Button constent source URL call to vf page
Hello Sr. developers
Can someone tell me how can I pass Id with visualforce page
I'm calling a visualforce page with constent source URL , I know I can choose the visualforce page but I want to pass the Id
below is my code
visualforce page
Extension
my button
It's saving but when I click button it gives error that page not found, but if i remove {!Campaign.Id} it works
I want to give visualforce page name and then Campaign.Id
Can someone tell me how can I pass Id with visualforce page
I'm calling a visualforce page with constent source URL , I know I can choose the visualforce page but I want to pass the Id
below is my code
visualforce page
<apex:page standardController="Campaign" extensions="OnLoadController" action="{!open_Donation_Site}" />
Extension
public class OnLoadController { Site subdomain; public OnLoadController(apexPages.StandardController con){} public String open_Donation_Site(){ subdomain = [SELECT Subdomain FROM Site limit 1]; Organization apt = [SELECT InstanceName FROM Organization]; return 'https://'+subdomain.Subdomain+'.'+apt.InstanceName+'.force.com/CampaignPayment?id='; } }Actully I'm creating a managed pack that's why I want to fetch dynamically site domain name from different orgs.
my button
It's saving but when I click button it gives error that page not found, but if i remove {!Campaign.Id} it works
I want to give visualforce page name and then Campaign.Id
/apex/Nuclay__open_in_site?id={!Campaign.Id}
All Answers
/apex/Nuclay__open_in_site?id={!Campaign.Id}
Yes I solved this issue with same code