function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AnonTestQuestAnonTestQuest 

How to include a link in an email that's specific to the instance

I have a batch and it sends an email out at the end to users who fit a certain criteria. In each email, I need to include a specific salesforce link to a record that's owned by them. What's the best way to do this? I imagined I would run through getBaseUrl() and then add a '/' then the custom link to that specific record. Just not sure how to get that specific Id that pertains to that person in that instance.
Rufus RodenRufus Roden

Not sure what you mean exactly. 

The Salesforce instance can be got using this: URL.getSalesforceBaseUrl().toExternalForm()
If you put the '/' + objectId on the end it should go, at least in classic mode, to the object page. 

However you seem to have worked this out already.  You might need to explain what you mean by "specific Id that pertains to that person in that instance"