Custom Salesforce (docusign) button not firing. Error code provided
<p>I have built a custom button in salesforce on the opportunity object to link back to docusign and run a very specific set of actions. At first when i put the button in salesforce i would receive an error code. Now, i cannot get the button to fire at all. I ran firebug on the button and i see that there is a javascript error. I will pubslish all that i have here. You can also reference my previous question here: <a href="https://stackoverflow.com/questions/38085985/custom-salesforce-button-for-docusign-giving-error-unexpected-token">Custom Salesforce button for Docusign giving error - unexpected token~</a></p>

<pre><code>{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}

//********* Option Declarations (Do not modify )*********//var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';varCCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';varCES='';var STB='';varSSB='';var SES='';var SEM='';var SRS='';var SCS ='';varRES='';//*************************************************//

// Modify individual options here://RSRO = '1';RROS = '1';CRL = 'Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 1;RoutingOrder~1;SignNow~1'; OCO = 'Tag';LA = '1';STB = '1';SSB = '1';SES = '1';SEM = '1';SRS = '1';

//********* Page Callout (Do not modify) *********//window.location.href ="/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&amp;SourceID={!Opportunity.Id}&amp;RC="+RC+"&amp;RSL="+RSL+"&amp;RSRO="+RSRO+"&amp;RROS="+RROS+"&amp;CCRM="+CCRM+"&amp;CCTM="+CCTM+"&amp;CRCL="+CRCL+"&amp;CRL="+CRL+"&amp;OCO="+OCO+"&amp;DST="+DST+"&amp;CCNM="+CCNM+"&amp;LA="+LA+"&amp;CEM="+CEM+"&amp;CES="+CES+"&amp;SRS="+SRS+"&amp;STB="+STB+"&amp;SSB="+SSB+"&amp;SES="+SES+"&amp;SEM="+SEM+"&amp;SRS="+SRS+"&amp;SCS="+SCS+"&amp;RES="+RES;
//*******************************************//
</code></pre>

<p>Here is the error code i see from within firebug:</p>

<pre><code>&lt;script&gt;
window.invokeOnClickJS_00bj0000001KavA = function(element) {
function getRecordIds(keyPrefix) { return Scontrol.prototype.getSelectedRecordIdsFromForm(element.form, keyPrefix); }
element.invokeAction = function() {
var scriptLibrary = [];
scriptLibrary.push("/apex/dsfs__DocuSign_JavaScript");
Util.loadScripts(scriptLibrary, 0, function() {
try { Util.stripCustomFunctionFromObjectPrototype(Array);eval('\r\n\r\n/\/\*\*\*\*\*\*\*\*\* Option Declarations (Do not modify )\*\*\*\*\*\*\*\*\*\//var RC = \'\';var RSL=\'\';var RSRO=\'\';var RROS=\'\';var CCRM=\'\';var CCTM=\'\';varCCNM=\'\';var CRCL=\'\'; var CRL=\'\';var OCO=\'\';var DST=\'\';var LA=\'\';var CEM=\'\';varCES=\'\';var STB=\'\';varSSB=\'\';var SES=\'\';var SEM=\'\';var SRS=\'\';var SCS =\'\';varRES=\'\';/\/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\//\r\n\r\n// Modify individual options here://RSRO = \'1\';RROS = \'1\';CRL = \'Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 1;RoutingOrder~1;SignNow~1\'; OCO = \'Tag\';LA = \'1\';STB = \'1\';SSB = \'1\';SES = \'1\';SEM = \'1\';SRS = \'1\';\r\n\r\n/\/\*\*\*\*\*\*\*\*\* Page Callout (Do not modify) \*\*\*\*\*\*\*\*\*\//window.location.href =\"/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&amp;SourceID=006j000000KsS79&amp;RC=\"+RC+\"&amp;RSL=\"+RSL+\"&amp;RSRO=\"+RSRO+\"&amp;RROS=\"+RROS+\"&amp;CCRM=\"+CCRM+\"&amp;CCTM=\"+CCTM+\"&amp;CRCL=\"+CRCL+\"&amp;CRL=\"+CRL+\"&amp;OCO=\"+OCO+\"&amp;DST=\"+DST+\"&amp;CCNM=\"+CCNM+\"&amp;LA=\"+LA+\"&amp;CEM=\"+CEM+\"&amp;CES=\"+CES+\"&amp;SRS=\"+SRS+\"&amp;STB=\"+STB+\"&amp;SSB=\"+SSB+\"&amp;SES=\"+SES+\"&amp;SEM=\"+SEM+\"&amp;SRS=\"+SRS+\"&amp;SCS=\"+SCS+\"&amp;RES=\"+RES;\r\n/\/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\//') } catch (e) { alert('A problem with the OnClick JavaScript for this button or link was encountered:\n\n' + (e.message ? e.message : e)) }
finally { Util.restoreCustomFunctionsToObjectPrototype(Array);}
});
};
element.invokeAction();
}
&lt;/script&gt;
</code></pre>