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
Gautam_KasukhelaGautam_Kasukhela 

Is there a way to retrieve the current instance from the URL without using Apex

Hello All,
   I am currently using VF Email templates to send out a mail (using workflow) on creation of an Account. The email should also have a logo embedded. As per the below article static resources cannot be used and we should upload the logo into the Documents object.

https://help.salesforce.com/apex/HTViewSolution?urlname=Why-images-stored-as-static-resources-cannot-be-seen-in-emails-sent-using-VF-email-templates-1327108316482&language=en_US

In the last line of the above article, it is shown how the image should be referred to in the VF Email template.Some values need to be dynamically populated such as:  https://c.<instance>.content........
How can I get the current instance from the URL without using Apex? (I am not using any controllers). Is there a way to get that value (like cs6,na11, etc.) during rum time? I just need 'cs6' or 'na11' and not the complete URL.

I used a function in a formula field to fetch the value:  LEFT($Api.Partner_Server_URL_320, FIND( '/services', $Api.Partner_Server_URL_320)) but this returns https://cs6.salesforce.com

Regards,
Gautam.