function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
atlantisatlantis 

How to navigate vf page with URL field

Hi Guys,

Supposing I created a custom field with URL type on any object,

I need to set the default value which navigates to a VF page. What I populate is i.e. '/apex/helloworld'. But when the link is clicked on detail page, it takes me to a new place http://apex/helloworld which is not existing.

 

Does anybody know how to insert relative instance name before the '/apex/helloworld', such as global variables?

 

Regards,

Atlantis

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

I've used the following formula to find the Salesforce instance:

 

 

Left($Api.Enterprise_Server_URL_190,(find('/services',$Api.Enterprise_Server_URL_190)))

 

 

All Answers

bob_buzzardbob_buzzard

I've used the following formula to find the Salesforce instance:

 

 

Left($Api.Enterprise_Server_URL_190,(find('/services',$Api.Enterprise_Server_URL_190)))

 

 

This was selected as the best answer
atlantisatlantis

thanks bob,

it works.