I have created a custom email template with Opportunity Fields.
In the Email template, I want to create a link that will open a record. The recordId of the is auto stored in a text field on the Opportunity via flow. I am wondering how I could create a URL in the email template to open the Detail Page of the record
This is the approach I was thinking of -
Create a custom label with the URL of the org.
In the email template concatenate the custom label value and the Custom text field value
However this will build the URL as
https://somethingsomething--SB3.lightning.force.com/lightning/r/Request__c/aAA6a000000AANaAAa
Instead of
https://somethingsomething--SB3.lightning.force.com/lightning/r/Request__c/aAA6a000000AANaAAa/view
How can i append the /view ?
or is there a way to build a detail record link in the email template?
Edit 06/25/2022
Based on suggestion I was able to get the link to work (see screen shot). However I don't want to hard code the URL as this will break when deployed to other environments.
How can I make the URL dynamic so that it will work in all the environments?