Link to Record in Custom Email

  • 0
  • 1
  • Question
  • Updated 5 years ago
  • Answered
Hello,

I have created a link that runs some HTML and composes and email from within a record. The problem is that I need to create a link back to the record in the email, and I can't seem to get %reclink% to work. I'm not sure if %reclink% only works in the standard notifications section or not. If so, can anyone suggest a workaround? The code I use for the custom email is:

"<a href=\"mailto:"& UserListToEmails([Select Email Recipients]) &"?subject="& URLEncode("Client Name: "&[Location Name]) & "&body=%reclink%" & "\">" &"Send Email to Selected"& "</a>"


Any guidance would be greatly appreciated. Thanks in advance.
Photo of Brian

Brian

  • 0 Points

Posted 5 years ago

  • 0
  • 1
Just create a field called [Link to record] with the formula


urlroot() & "db/" & dbid() & "?a=dr&rid=" & totext(record id#])



"<a href=\"mailto:"& UserListToEmails([Select Email Recipients]) &"?subject="& URLEncode("Client Name: "&[Location Name]) & "&body=" & [Link to record] & "\">" &"Send Email to Selected"& "</a>"
Photo of Brian

Brian

  • 0 Points
Awesome, thanks Mark.  I had to make one tweak to your [Link to record] field in order for it to pass the ampersand.  Just wanted to post the working formula in case it helps anyone else out.

urlroot() & "db/" & dbid() & URLEncode("?a=dr&rid=") & totext(record id#])

Thanks again.
Photo of JOSH

JOSH

  • 0 Points
Add a left bracket to record id# : urlroot() & "db/" & dbid() & URLEncode("?a=dr&rid=") & totext([record id#]).

Thanks for this.