Cancel and Go Back Button
Hi Everyone, I'm new to Quickbase and could use some help.
I'm building an application with two related tables:
- Price Request (Header Table)
- Attachments Table (Each Price Request can have multiple attachments)
I've created a form in the Price Request table with an "Add Attachment" button that routes users to the Attachment form, allowing them to upload documents. Here's the formula I'm using for that:
URLRoot() & "db/" & [_DBID_ATTACHEMENTTABLE] & "?a=API_GenAddRecordForm&_fid_7=" & URLEncode([Record ID#]) & "&z=" & Rurl()
Now, I want to add a "Cancel and Go Back" button on the Attachment form that:
- Deletes the current attachment record.
- Redirects the user back to the related Price Request record.
Here's the formula I tried:
URLRoot() & "db/" & Dbid() & "?a=API_DeleteRecord"
& "&rid=" & URLEncode([Record ID#])
& "&apptoken=APP_TOKEN"
& "&rdr=" & URLEncode(
URLRoot() & "db/" & [_DBID_PRICEREQUESTTable] & "/form?a=dr&rid=" & [Related Price Request])
But I’m getting this error:
<qdbapi> <action>API_DeleteRecord</action> <errcode>30</errcode> <errtext>No such record</errtext> <errdetail>Missing "rid" parameter.</errdetail> </qdbapi>
In the picture below(Attachment Form)
Field Pricing Request ID is a lookup field from Price Request Table(Related Price Request)
Field Price Request - Status is a look up field from Price Request Table