0

enter image description hereI have requirement to append contact link as url in email action in record trigger flow

  1. I have used Custom label stored as base url like: test.salesforce.com
  2. Created formula: {!$Label.Base_Url}&{!$Record.Id}

working fine but every time when I refresh Sandbox I need to update url in custom label

Please suggest is there any other way instead of hardcoded url.

I can use class email template instead of flow email action to get URL like contact.detailedlink but according to my requirement its not much suitable to use classic email template and send as email alert

7
  • $Site.BaseUrl instead of $Label.Base_Url, perhaps?
    – sfdcfox
    May 19 at 14:56
  • Looks like $site global variable not available in flow. @sfdcfox
    – sarah
    May 19 at 15:14
  • I wasn't sure, I don't use flows a lot.
    – sfdcfox
    May 19 at 15:15
  • thanks though for your quick response !@sfdcfox
    – sarah
    May 19 at 15:16
  • can you use this hoary old trick - salesforce.stackexchange.com/questions/3816/…?
    – cropredy
    May 19 at 16:22
1

Sorry for the delay

I created a formula field in the Flow called detailLink and defined as:

LEFT($Api.Enterprise_Server_URL_510, FIND( '/services', $Api.Enterprise_Server_URL_510)) & 
    {!$Record.Id}

Then, referenced this formula field in the Email action

enter image description here

1
  • Thanks !! @cropredy
    – sarah
    Jun 2 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.