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
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
ManojjenaManojjena
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 !!
Thanks
Manoj
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