+ Start a Discussion
Internal PartnerInternal Partner 

Hard coding

Hi all,

I was wondering if there is a possibility not to hard code the location of images in email templates. We are linking images with a Sandbox location, what happens if the image is deleted or moved to another environment?.
For example, we have the following code in the email template and the email template is in the Salesforce instance CS109:
 
<img align="center" alt="Image" border="0" class="center autowidth" src="https://c.cs110.content.force.com/servlet/servlet.ImageServer?id=0150Q000000C8yp&oid=00D0Q0000009cAu&lastMod=1557822678000" style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; border: 0; height: auto; float: none; width: 100%; max-width: 300px; display: block;" title="Image" width="300"/>
I would appreciate any advice about best practices in such a case.
 
MagulanDuraipandianMagulanDuraipandian
Avoid lastmod parameter.
Store it in prod and reference it.
https://www.infallibletechie.com/2019/07/how-to-avoid-instance-name-in-document.html
Internal PartnerInternal Partner
Hi Magulan, thanks for your tip. Why should lastmod be avoided?