Loading

Use Asset Files in email templates instead of Document records

Publiseringsdato: Oct 13, 2022
Beskrivelse
Create Asset Files Right from your Asset Library 
These assets can now be used instead of Document records in email templates.
Løsning
  1. Create asset files. There are 3 approaches to create private assets (not available to guest/unauthenticated users):
    1. To create asset files in community builder refer to Find and Create Asset Files in Community Builder. This step creates a ContentDocument record and a ContentAsset record.
    2. Alternatively Upload and File Sharing Overview explains how you can upload a file, for which a ContentAsset record will have to be created via the API.
    3. Another option is to bulk insert files via Data Loader. Make sure to set IsAssetEnabled to true so that the corresponding private assets is created.
  2. Make the private assets public. There are 2 approaches:
    1. Navigate to Setup | File Assets, and locate the created asset file to make sure "Let unauthenticated users see this asset file" is checked.
    2. Alternatively, update the involved ContentAsset records via the API to set IsVisibleByExternalUsers to true.
  3. Finally, modify your email template to ensure unauthenticated users can retrieve the image from the following URL:
If My Domain is not enabled: https://<instance>.salesforce.com/file-asset-public/<asset_name>?oid=<organization_Id>
If My Domain is enabled: https://<my_domain>.my.salesforce.com/file-asset-public/<asset_name>?oid=<organization_Id>
Knowledge-artikkelnummer

000384022

 
Laster
Salesforce Help | Article