You need to sign in to do that
Don't have an account?
imAkashGarg
URGENT: change in link while deploying
i have a visualfoce page in dev environment with a button pointing to other visualforce page. now when i deployed the page to other environment using change set..... the link was not working in that env.
in the dev env. the link is something like: https://c.cs0.visual.force.com/apex.....
and in the other env. it is: https://c.cs12.visual.force.com/apex.....
can't i have a common link so that i dont have to manually change them while deploying?
Thanks for your suggestions.
This worked by simply passing the partial URl to the PageReference,
i.e. '/apex/pageName'
Creates a PageReference to any page that is hosted on the Force.com platform.
Here, refers to the Visualforce page located at:
http://mySalesforceInstance/apex/pageName
Thanks.
All Answers
You can refer to a visualforce page by calling.
Page.Yourpagenamehere
for instance, in my controller I have
The Visualforce page "MyPage" actually lives as https://instance.salesforce.com/apex/MyPage
Hope this helps.
hey thanx.
i did the same thing. we need to return the url of the page. but this url keeps changing on different enviroenments.
i want to write a common url that could be referenced to any environment.
You may be able to build it in your apex controller by using the headers to get the instance server you are currently on.
Consider:
This only returns the fully qualified domain name of the Salesforce instance, cs9.salesforce.com for me.
so I concatenate the rest of the url in a string.
Maybe that can help you. Something to think about at least.
Cheers.
How are you using the url that requires you to hard code the server? If it is within a visualforce page, you should be able to use the urlfor formula function to generate the url with the correct server....
Thanks for your suggestions.
This worked by simply passing the partial URl to the PageReference,
i.e. '/apex/pageName'
Creates a PageReference to any page that is hosted on the Force.com platform.
Here, refers to the Visualforce page located at:
http://mySalesforceInstance/apex/pageName
Thanks.