IvanWeiss
6 years agoQrew Captain
Combining MailTo with Edit Record API
I have a button I am trying to create which will send an email through Outlook as well as update a date field on the table so I know when the email was created. I do not think the second call is working. It looks like a blank change after the email sends. Not sure if I can combine these two sets of code or not?
var text URLONE = "MailTo:" & [Company - Startup & Demo Request Email] &
"?cc=" & ToText([Project Manager]) &
"&subject=" & URLEncode("Schedule Startup & Demo - ") & [Manufacturer] &
"&body=Please schedule the following request and confirm receipt of this email:" & "%0A%0A" &
"Manufacturer: " & [Manufacturer] & "%0A" &
"Model: " & [Model] & "%0A" &
"Serial: " & [Serial] & "%0A" &
"Roequested Date: " & [Requested Date] & "%0A" &
"Prject Name: " & [Project Name] & "%0A" &
"Project Address: " & [Project Address] & "%0A" &
"Primary Contact: " & [Primary Contact Full Name] & "%0A" &
"Elite Project Manager: " & ToText([Project Manager]);
var text URLTWO = URLRoot() &"db/" & Dbid() & "?a=API_EditRecord"
& "&rid=" & [Record ID#] &
"&apptoken=c5gchf9bhwx6umbd2ii5zdqtb5x8" &
"&_fid_26=" & Today() &
"&rdr=" & URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];
$URLONE & "&rdr=" & URLEncode($URLTWO)
var text URLONE = "MailTo:" & [Company - Startup & Demo Request Email] &
"?cc=" & ToText([Project Manager]) &
"&subject=" & URLEncode("Schedule Startup & Demo - ") & [Manufacturer] &
"&body=Please schedule the following request and confirm receipt of this email:" & "%0A%0A" &
"Manufacturer: " & [Manufacturer] & "%0A" &
"Model: " & [Model] & "%0A" &
"Serial: " & [Serial] & "%0A" &
"Roequested Date: " & [Requested Date] & "%0A" &
"Prject Name: " & [Project Name] & "%0A" &
"Project Address: " & [Project Address] & "%0A" &
"Primary Contact: " & [Primary Contact Full Name] & "%0A" &
"Elite Project Manager: " & ToText([Project Manager]);
var text URLTWO = URLRoot() &"db/" & Dbid() & "?a=API_EditRecord"
& "&rid=" & [Record ID#] &
"&apptoken=c5gchf9bhwx6umbd2ii5zdqtb5x8" &
"&_fid_26=" & Today() &
"&rdr=" & URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];
$URLONE & "&rdr=" & URLEncode($URLTWO)