Skip to main content
Question

Strange Problem with Button to mark check box

  • September 8, 2024
  • 0 replies
  • 102 views

Forum|alt.badge.img+3

I've used this same concept in multiple places and they work correctly.  I have a couple of apps, and the current app is giving me a strange error message.  I'm hoping someone can give me advice on handling this.

Code from Button:

var text url = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Record ID#] &
    "&apptoken=d7s84zwcx5qf79csb72q6wrdjkd" &
    "&_fid_20=1" &
    "&rdr=" & //redirect parameter
    //URLEncode("https://exteriorsutah.quickbase.com/db/bug9w4puk"); URL meaning
    URLEncode(URLRoot()&"db/"&"bug9w4puk"&"?a=er&rid=" & [Related Invoice Header]); // Takes them to the invoice header in view mode, dr is view mode er is edit mode
    "<a class='Vibrant Primary' style=\"width:160px; text-align: center;\" href='" & $url & "'>Select for Pay</a>"

Error code being received:

<qdbapi>

<errtext>Invalid request - we cannot understand the URL you specified.</errtext>

<errcode>102</errcode>

<errdetails>ac0fb69d-e405-9558-bc99-a5a04c6ca98e:</errdetails>

</qdbapi>

 

Thank you,
Paul Elliott

Exteriors Utah, LLC

 

This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

I suggest that you use the table name like [_DBID_INVOICE_HEADER].  It's possible that you have used the application ID and hence the  bug9w4puk is incorrect.

You get that from the advanced settings for the invoice header table.  In fact the best practice is to always use a reference to the table as opposed to hard coding the Table ID or even the application ID because that way when you copy the app the button will still work.  

 

var text url = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Record ID#] &
    "&apptoken=d7s84zwcx5qf79csb72q6wrdjkd" &
    "&_fid_20=1" &
    "&rdr=" & //redirect parameter
    //URLEncode("https://exteriorsutah.quickbase.com/db/bug9w4puk"); URL meaning
    URLEncode(URLRoot() & "db/" & [_DBID_INVOICE_HEADER] & "?a=er&rid=" & [Related Invoice Header]); // Takes them to the invoice header in view mode, dr is view mode er is edit mode
    "<a class='Vibrant Primary' style=\"width:160px; text-align: center;\" href='" & $url & "'>Select for Pay</a>"

 

 

 


Forum|alt.badge.img+15
  • Registered
  • September 16, 2024

Paul,

What changed?   Can you share the error / development issue?


Forum|alt.badge.img+3
  • Author
  • Registered
  • September 16, 2024

Worst part was, once I got it working correctly, I was testing things and decided that the check box could be checked using the pipeline I was building and no longer needed to have it triggered manually.  So, I'm not even using the button.  


Forum|alt.badge.img+15
  • Registered
  • September 16, 2024

There are lots of things that I used to string together a bunch of API calls.  I then started using KeithJusas tool Juice Triggers for a few years.   Now I reach for a Pipeline.