+ Start a Discussion
JPSeaburyJPSeabury 

How do I create a formula to a VF page

In my sandbox, I have a custom formula field that looks like this:
 
Code:
HYPERLINK("https://cs2.salesforce.com/apex/CreateRma", 
    IMAGE("servlet/servlet.FileDownload—file=015R000000012D8", 
    "Create RMA") )

 
Works great in the sandbox, but when I push this page to my production environment, it will no longer work -- because I've hardcoded the "https://cs2.salesforce.com/" portion of the URL.
 
What is the proper syntax for linking to a Visualforce page as a relative link?
 
 
JohanLiljegrenJohanLiljegren
Not tested, but it could work to just say
HYPERLINK("/apex/CreateRma",
IMAGE("servlet/servlet.FileDownload—file=015R000000012D8",
"Create RMA") )

i.e. skip everything before the third forward slash?
JakesterJakester
If Johan's suggestion doesn't work, try posting in the developer.salesforce.com forum - they might have some ideas, too.