Forum Discussion

IvanWeiss's avatar
IvanWeiss
Qrew Captain
6 years ago

Error being generated in Rich Text Button

I am trying to make a button bar for my opportunities table so you can click on a button to change the phase the opportunity is in.  And this way the button is a different color when not selected.  However, I am getting an error. 

Here is the 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&rid=21&apptoken=c5gchf9bhwx6umbd2ii5zdqtb5x8&_fid_9=Designing&_fid_29=Changed Opportunity Status to Designing
</action>


<errcode>5</errcode>
<errtext>No Such Operation</errtext>
<errdetail>
This operation does not exist. Please check the URL.
</errdetail>






</qdbapi>



Here is the code:

//Button Functionality:
//
//Check the current Opportunity Stage
//
//If beyond Qualifying display button as gray
//Code should change the Opportunity status to Qualifying


var text CLASS = If([Stage]="Designing","btn btn-primary btn -sm","btn btn-default btn -sm");
var text FONTCOLOR = If([Stage]="Designing", "#FFFFFF", "#A9A9A9");
var text LABEL = "Designing";


//Change the Opportunity Stage to Designing
var text URLONE = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
                                    URLEncode("&rid=" & [Record ID#]) &
                                    URLEncode("&apptoken=c5gchf9bhwx6umbd2ii5zdqtb5x8") &
                                    URLEncode("&_fid_9=Designing") &
                                    URLEncode("&_fid_29=Changed Opportunity Status to Designing") &
                                    "&z=" & Rurl();
                                    
//Create edit functionality
var text URL = "href='" & $URLONE & "'";
                             
"<a class='" & $CLASS & "' style='color: " & $FONTCOLOR & "; text-decoration: none'" & $URL & ">" & $LABEL & "</a>"


  • Your URLEncodes are all messed up, but I won�t be able to help right away, maybe tomorrow. Not at s computer now.
    • IvanWeiss's avatar
      IvanWeiss
      Qrew Captain
      I actually did figure it out and also got the recommend change from &z=Rurl to a rdr.  I had bought hte Quick Base Junkie premium videos which is where I picked up these ideas and Sharon was good enough to respond when I reached out.