+ Start a Discussion
Jha dilipJha dilip 

can we use relative urls with formula fields instead of absolute urls

Hi All,

i am fetching a url in formula field which is absolute url so i want to remove url and convert to absolute url is it feasible.

like https:// ap1.salesforce.com/resource/image to resource/image

any suggestion
HI Jha Dilip ,

Try with below code it will give you https://ap1.salesforce.com/

LEFT( $Api.Enterprise_Server_URL_25 , FIND('/', $Api.Enterprise_Server_URL_25, 9) )

Let me know if it helps !!
Jha dilipJha dilip
Hi Manoj,

thanks for your reply yes with above code we can get url but my requirement is to convert absolute url to relative url.

at the moment my formula field is having value as  https:// ap1.salesforce.com/resource/image to resource/image
so when record is saved i get proper image url.

but i want to convert it to relative url so formula field url would be resource/image but it should show link with this also which is not happening