IvanWeiss
6 years agoQrew Captain
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>"
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>"