Skip to main content
Question

URL button not saving

  • September 9, 2021
  • 0 replies
  • 44 views

I am using a URL button to edit part of a record I am currently working on. If I don't save first and I press the button, QB initiates the save dialogue on it's own but then gives me the following error after I tell it to save:

<qdbapi>
<action>API_EditRecord</action>
<errcode>30</errcode>
<errtext>No such record</errtext>
<errdetail>Missing "rid" parameter.</errdetail>
</qdbapi>

If I save the record first using the built in save button on the form my URL button works just fine. I don't understand why the auto-save feature is throwing the error.

URL button is as follows:

URLRoot() & "db/" & [_DBID_FLIGHT__DUTY_AND_REST] & "?a=API_EditRecord&rid=" & URLEncode ([Record ID#])//& "&z=" & Rurl()
& "&_fid_370=" & Now()
& "&_fid_269=VALID SIGNATURE"
& "&_fid_376=" & [Pilot Initials] & " " & Now()
& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_FLIGHT__DUTY_AND_REST] & "?a=dr&rid=" & URLEncode ([Record ID#])

------------------------------
Dante Tognoli
------------------------------

MarkShnierYou
Forum|alt.badge.img+24
This part of the code

"?a=API_EditRecord&rid=" & URLEncode ([Record ID#])

says to edit the record and then provides the [Record ID#] to edit.  The [Record ID#] does not exist until after you save, so you are trying to edit record "blank".


------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------