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, 2021 at 14:56
  • Looks like $site global variable not available in flow. @sfdcfox
    – sarah
    May 19, 2021 at 15:14
  • I wasn't sure, I don't use flows a lot.
    – sfdcfox
    May 19, 2021 at 15:15
  • thanks though for your quick response !@sfdcfox
    – sarah
    May 19, 2021 at 15:16
  • 1
    I have tried by referring above link {!LEFT({!$Api.Enterprise_Server_URL_260},FIND('.com',{!$Api.Enterprise_Server_URL_260})+4)+{!$Record.Id}}} but not sure I am getting as text
    – sarah
    May 19, 2021 at 18:58

1 Answer 1

3

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

4
  • Thanks !! @cropredy
    – sarah
    Jun 2, 2021 at 15:12
  • @cropredy I'm using this formula, but how could I make it as a hyperlink?
    – Cline
    May 5 at 21:50
  • @Ana - Not sure I understand your question, my answer renders in the screen flow as a clickable hyperlink. If you have a different question, post a new question with example of what you've tried and your desired result
    – cropredy
    May 6 at 0:21
  • @cropredy I post it:salesforce.stackexchange.com/questions/375416/…
    – Cline
    May 6 at 1:47

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.