Forum Discussion

GeorgeBramhall2's avatar
GeorgeBramhall2
Qrew Cadet
3 years ago

Error in a URL Button

Any ideas why I am getting the followon error for this URL button:

I have the following code for a URL Button:
If((not([showcalledby]) or [Unclaim Lead]),
URLRoot() & "db/" & [_DBID_LEAD_NOTES] & "?a=API_EditRecord&rid=" & [Record ID#] &
"&rid=" & [Record ID#] &
"&_fid_39=" & URLEncode ([Current User]) &"&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()))

but I am getting the following error:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<qdbapi>
<action>API_EditRecord</action>
<errcode>30</errcode>
<errtext>No such record</errtext>
<errdetail>Missing "rid" parameter.</errdetail>
</qdbapi>


------------------------------
George Bramhall
------------------------------

12 Replies

  • You have "&rid=" & [Record ID#] & twice. Remove the second instance.

    If((not([showcalledby]) or [Unclaim Lead]),
    URLRoot() & "db/" & [_DBID_LEAD_NOTES] & "?a=API_EditRecord&rid=" & [Record ID#] &
    "&rid=" & [Record ID#] & //REMOVE THIS LINE
    "&_fid_39=" & URLEncode ([Current User]) &"&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()))

    ------------------------------
    Michael Tamoush
    ------------------------------
    • GeorgeBramhall2's avatar
      GeorgeBramhall2
      Qrew Cadet
      Ok, fixed that but still get the same error.

      ------------------------------
      George Bramhall
      ------------------------------
      • MichaelTamoush's avatar
        MichaelTamoush
        Qrew Captain
        Does the record ID exist yet? ie - are you pushing the button when creating a new record, or has it been saved and the rid created?

        ------------------------------
        Michael Tamoush
        ------------------------------