KevinO_Boyle
8 years agoQrew Cadet
Can I use a formula URL button to create an email using an email client and redirect to the initial report?
I'm trying to make it easier for my CRM users to research a lead and email a lead so I'm providing URL buttons to enable a google search or a mailto: link. I'm also trying to track the activity to provide a report to their managers so I need to 1) edit the record, 2) open the email and then 3) redirect back to the original report. I'm struggling to get the third re-direct to work.
Code is below
var text weblink = "http://www.website.com";
var number NewToggleValue = If ([Email toggle]=true,0,1);
var text URLONE = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&key=" & [Record ID#]
& "&_fid_419=$NewToggleValue"&"&apptoken=aaaaaaaaaaaaaaaaaaaaaaaaaa";
var text URLTWO = "mailto:"&[email address]&";"&[Sales Rep for Leads - Email Address (P)]&";"&[Sales Rep for Leads - Email Address (S)]&"?subject=Your inquiry about ..." &"&body=Hello,%0A%0AThank you for your interest in ... I?m ... ? the sales representative in your area. My contact details are below. If there is anything I can do to help with your project, please don?t hestitate to contact me. %0A%0AThank you. %0A?"&"{insert name here}"&"%0A"&"{and email here}"&"%0A... You may personalize the message by modifying this text.%0A"&"%0APlease click the link below to learn more: %0A" &$weblink;
var text URLTHREE = URLRoot() & "db/" & Dbid() & "?a=q&qid=153";
"<a href="& $URLONE & "&rdr="& URLEncode($URLTWO) &URLEncode("&rdr="& URLEncode($URLTHREE))&"'><img src=\"https://images.quickbase.com/si/32/016-email_0.png\"></a>";
Code is below
var text weblink = "http://www.website.com";
var number NewToggleValue = If ([Email toggle]=true,0,1);
var text URLONE = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&key=" & [Record ID#]
& "&_fid_419=$NewToggleValue"&"&apptoken=aaaaaaaaaaaaaaaaaaaaaaaaaa";
var text URLTWO = "mailto:"&[email address]&";"&[Sales Rep for Leads - Email Address (P)]&";"&[Sales Rep for Leads - Email Address (S)]&"?subject=Your inquiry about ..." &"&body=Hello,%0A%0AThank you for your interest in ... I?m ... ? the sales representative in your area. My contact details are below. If there is anything I can do to help with your project, please don?t hestitate to contact me. %0A%0AThank you. %0A?"&"{insert name here}"&"%0A"&"{and email here}"&"%0A... You may personalize the message by modifying this text.%0A"&"%0APlease click the link below to learn more: %0A" &$weblink;
var text URLTHREE = URLRoot() & "db/" & Dbid() & "?a=q&qid=153";
"<a href="& $URLONE & "&rdr="& URLEncode($URLTWO) &URLEncode("&rdr="& URLEncode($URLTHREE))&"'><img src=\"https://images.quickbase.com/si/32/016-email_0.png\"></a>";