How can I reference the current record's URL when creating a formula-URL mailto email?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I'm using a formula-URL field to do an on-demand email and it looks a bit like this. At the end, I want to show the URL for the current record. I've looked at dozens of formula-URL suggestions and can't find an answer. Can you help me correctly generate either/or:

1. A link to the record that spawns the email from the Formula-URL field or

2. A link to edit the record that spawns the email from the Formula-URL field.

Thank you in advance!


"mailto:" & "someuser@someplace.com"&

"?cc=" & "someotheruser@someplace.com"&

"&subject=" &[Email Subject Line] & 

"&body="


& "Hello," & "%0A%0A"

& "Blah, blah, content" & "%0A%0A"

& "Please copy this link into your browser to see the full request: " & URLRoot() & "db/" & Dbid() & "?a=er&rid=" & ToText([Record ID#]) &"%0A%0A"


Photo of Larbi

Larbi

  • 20 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,168 Points 50k badge 2x thumb
Can you tell us what is wrong with your formula above? What does the recipient see when they receive Email which has been sent from the users client email such as Gmail or Outlook. Are you saying that the link to the record is not hyperlinked?
Photo of Larbi

Larbi

  • 20 Points
It returns the base URL for the app without the specific target (where the Xs represent the base location of the app itself):

https://illumina.quickbase.com/db/xxxxxxxxx?a=er
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,168 Points 50k badge 2x thumb
Funny,
I just figured out that one this week.

You need to URLEncode the last part of the URL. The & and the = confuses the mailto

& URLRoot() & "db/" & Dbid() & URLEncode("?a=dr&rid=" & ToText([Record ID#]))
&"%0A%0A"
Photo of Larbi

Larbi

  • 20 Points
Thanks, Mark! This would be a nice default field, like created date.