Pages

Sunday, March 28, 2021

Salesforce: Lightning Email Template

There are 2 permissions related to the Lightning Email Template:

  1. Create Folders for Lightning Email Templates
  2. Manage Public Lightning Email Templates
Both of the permission names above are obvious on what permissions are given by enabling each of them.

Folders and Enhanced Sharing

If Folders and Enhanced Sharing for Lightning Email Templates have not been enabled, navigate to the Setup menu and search for Lightning Email Templates.

Once enabled, the email template folder and sharing access will similar to the report and dashboard folder, users with the above permissions will be able to:

  • Create folder and sub-folder to store Lightning email template
  • Share folder by user name, roles, public groups, territory
  • Share folder with access: manage, edit, view

Create Folder and Email Template

Navigate to the Email Templates tab, if you do not see it, click the 9-dots icon and type Email Templates. From here, you can create a New Email Template and New Folder. To create Sub Folder, open a folder and click the "New Folder" button, access to users in the subfolder will follow access given to the main folder.

Once the folder created, you can give the folder access to your team members, then start creating email templates. You should insert merge fields to increase your user's productivity by typing fewer words when sending email, sample:


Make sure to select the correct Related Entity Type, store it in the right folder, and make use of the merge field function.

You also can add files into the email template, when the user selects the email template, those files will be automatically added as attachments.

Additionally, users can store the email template in the Private Email Templates folder, so no other users can access or change it.


Using Email Template

In this sample, the email template created is for Case, make sure Email is added in Lighting Action on the Case page layout.

Open a case, click the Email tab, then select the email template created in the previous step.


Click the 3rd icon to insert an email template, including adding files as email attachments (1st icon), adding merge field (2nd icon), preview email (4th icon), clear and revert email template selected (5th icon), and pop out the email editor (6th icon).




Monday, March 15, 2021

Salesforce: Adding Signature in Email

It is simple to add an email signature in Salesforce, so all emails sent out will have your signature at the bottom of the email. Click your avatar, select Settings, and then My Email Setting.


Adding Images and clickable Links

However, many users would like to add the company logo or special image to their email signature. How to add these? 

You can't simply copy and paste the image to the signature box. So, a little effort here, you need to upload the image to "somewhere" so it is available for the public, such as https://inspireplanner.com/wp-content/uploads/2020/06/SimplySfdc-logo.png

Or, you can upload the image to Files in Salesforce; here is the step

1. Go to the Files tab and upload the image
2. Open the image and click "Public Link"
3. Click the "Create Link" button, then click the Create button
4. Copy the link, e.g. https://ap8.salesforce.com/sfc/p/90000000KY45/a/0o000000Qswm/mQ0LPPezg1w5wZB7QPMTN_u8.gneeZsOR7JHNdzeakY
5. Open the link in a new browser tab
6. Right-click and select "Open image in new tab", and copy the URL from the new tab, e.g. https://c.ap8.content.force.com/sfc/dist/version/renditionDownload?rendition=ORIGINAL_Png&versionId=0680o00000JjuVS&operationContext=DELIVERY&contentId=05T0o00000zNw6g&page=0&d=/a/0o000000Qswm/mQ0LPPezg1w5wZB7QPMTN_u8.gneeZsOR7JHNdzeakY&oid=00D90000000KY45&dpt=null&viewId=

Note: if your users do not see "Public Link", make sure the users have "Create public link" permission in Permission Set or Profile assigned.

Now we can put the URL into our email signature, but before that, let us learn a bit of basic HTML

<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="600">

The above is an HTML sample to show an image on the web browser, including our email signature. We can replace "img_girl.jpg" with our long URL from step (6), replace the "alt" value, and remove "width" and "height" for the original image size.

So, here is the email signature result



Let us reduce the size of the image and add some clickable links by tweaking the HTML
Regards,
<b>Johan Yu</b>
Visit <a href="https://www.simplysfdc.com">SimplySfdc</a>
Click here to <a href="mailto:yujohan@mail.com">email me</a>
<img src="https://c.ap8.content.force.com/sfc/dist/version/renditionDownload?rendition=ORIGINAL_Png&versionId=0680o00000JjuVS&operationContext=DELIVERY&contentId=05T0o00000zNw6g&page=0&d=/a/0o000000Qswm/mQ0LPPezg1w5wZB7QPMTN_u8.gneeZsOR7JHNdzeakY&oid=00D90000000KY45&dpt=null&viewId=" alt="my logo" width="275" height="56">








Friday, March 12, 2021

Adding Image to Salesforce

Adding Image to the Lightning page

This is actually pretty simple:

  • add a Rich Text component in Lightning App Builder
  • copy the image from a browser
  • paste into the Rich Text component 
Bonus point, since this is a component, you can make use of "Set Component Visibility" to show/hide the Rich Text component based on the record field value or device or user detail or permission. Also, can use filter logic to show/hide the component.

In the rich text component, you can combine this formatted text and additional images.



Adding Image to Page Layout

Salesforce does not have a field with the type = image, however, we can make use formula field return text with the Image() formula. 

IMAGE(image URL, alternate text [, height, width])

You can enter any URL into the image URL, such as: 
IMAGE("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf8aRfxLWfr0CQLooZltAZkJjucrOLoA13nE_-TGqy3Pwlf8yaXOV_zMubAY2XJv1qTmkX0-tnqAvr0za3Op2g3XQ4SF-ZNtW4NoRyFCB6rGzlXmbJaFM9QRS2RAt2PQUhU526dUn-d-E/w400-h100/sc+utf8.png", "Hello", 157, 627)



or simply populate the Image URL and alternate text for the parameter
IMAGE("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf8aRfxLWfr0CQLooZltAZkJjucrOLoA13nE_-TGqy3Pwlf8yaXOV_zMubAY2XJv1qTmkX0-tnqAvr0za3Op2g3XQ4SF-ZNtW4NoRyFCB6rGzlXmbJaFM9QRS2RAt2PQUhU526dUn-d-E/w400-h100/sc+utf8.png","Hello")



However, the above image is public or depends on external storage. We can make use of the Salesforce library to store the images, check out this article


Static Resources
Another option is to load the image as Static Resources.

IMAGE("/resource/This_is_image", "Hello")



Since this is a formula field, you can make use of IF() function to determine which image to show based on the criteria.


FREE Images Components 📷 by SharinPix

FREE Images Components 📷 by SharinPix is a native Salesforce picture management based on Salesforce images capabilities. Use the components to display images on a record page. Choose from a banner format, photo album, slideshow or a slider. You can even upload images from the components as well!

Check out this component from AppExchange, or the paid version Image/Photo Management for Salesforce for more features.




Sunday, March 7, 2021

Einstein Analytics: Upload Excel File with Special Characters

Use case: you received an Excel file that contains characters not in English that need to be loaded as a dataset in Einstein Analytics, here an example:



But since Einstein Analytics only take CSV file, you need to save the Excel file into CSV file. When you open the CSV file with a text editor, the multibyte characters such as Chinese, Japanese and Korean become "?", while extended ASCII characters such as Ã¶ are maintenance.



When we upload a CSV file to Einstein Analytics, by default, the File Encoding is UTF-8.


This will cause that special characters from extended ASCII not encode properly.



By changing the File Encoding to US-ASCII, this will solve the issue of characters in extended ASCII, but not for multibyte characters. So, if your data source does not have multibyte characters, this approach will work.



CSV UTF-8

If you are aware of when do Save As in Excel, there is an option to save as type "CSV UTF-8" (instead of just CSV). Here is the result when open the CSV file from the same Excel file with a text editor



Now, let us upload this CSV file to Einstein Analytics and keep the file encoding to UTF-8.







Page-level ad