Forum Discussion
This formula would be called from within an email so wouldn't it be best practice to ask for user to sign into quickbase, as only approved users can access app?
Also, I got "LEAVE REQUEST Record Not Found" error when trying the url: https://mit.quickbase.com/db/buk4s63ek?a=API_AddRecord&rid=465&apptoken=b6w3x2vddzcyk3c8upwsnbu5vqbw&_fid_25=Approved&rdr=https%3A%2F%2Fmit.quickbase.com%2Fdb%2Fbuk4s62x2%3Fa%3Ddbpage%26pageID%3D2
though the code is supposed to be just adding a new record to DECISION STATUS CHANGES, connecting this record with it's related APPROVER, REQUEST DECISION, and LEAVE REQUEST.
Code taken from your reply and edited to fit my app:
var text APPTOKEN = "b6w3x2vddzcyk3c8upwsnbu5vqbw";
// Define the Approval URL to add a new record to the DECISION STATUS CHANGES table
var text APPROVED =
URLRoot() & "db/" & [_DBID_DECISION_STATUS_CHANGES] &
"?a=API_AddRecord" &
"&rid=" & URLEncode ([Record ID#]) &
"&apptoken="& $APPTOKEN &
"&_fid_25=" & "Approved";
var text LandingPage = URLRoot() & "db/" & AppID() &
"?a=dbpage&pageID=2";
$Approved
& "&rdr=" & URLEncode($LandingPage)
Any ideas why it is trying to access a LEAVE REQUEST record instead of adding a record to DECISION STATUS CHANGES?