You need to sign in to do that
Don't have an account?
Russell Lester
Question about JavaScript in custom button.
I am trying to get a custom button to work in Console mode for DocuSign. I was given a link to this page:
https://support.docusign.com/en/guides/dfs-admin-guide-custom-buttons-console
I then attempted to compile the code as shown below. When I click the button, I get an error of "unexpected identifer" Please advise.
function inIframe () {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}
if(inIframe())
{window.open("{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
var sourceId =DSGetPageIDFromHref();var RQD=DSGetPageIDFromHref();
window.open() = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID="+sourceId+"&RQD="+RQD"+, "Popup", "location=1, status=1, scrollbars=1, resizable=1, directories=1, toolbar=1, titlebar=1, width=1200");
} else
{window.location.href = "{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
var sourceId =DSGetPageIDFromHref();var RQD=DSGetPageIDFromHref();
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID="+sourceId+"&RQD="+RQD"+location=1, status=1, scrollbars=1, resizable=1, directories=1, toolbar=1, titlebar=1, width=1200;
}
https://support.docusign.com/en/guides/dfs-admin-guide-custom-buttons-console
I then attempted to compile the code as shown below. When I click the button, I get an error of "unexpected identifer" Please advise.
function inIframe () {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}
if(inIframe())
{window.open("{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
var sourceId =DSGetPageIDFromHref();var RQD=DSGetPageIDFromHref();
window.open() = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID="+sourceId+"&RQD="+RQD"+, "Popup", "location=1, status=1, scrollbars=1, resizable=1, directories=1, toolbar=1, titlebar=1, width=1200");
} else
{window.location.href = "{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
var sourceId =DSGetPageIDFromHref();var RQD=DSGetPageIDFromHref();
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID="+sourceId+"&RQD="+RQD"+location=1, status=1, scrollbars=1, resizable=1, directories=1, toolbar=1, titlebar=1, width=1200;
}
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
var sourceId = DSGetPageIDFromHref();
var RQD = DSGetPageIDFromHref();
{window.open("/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID=" + sourceId + "&RQD=" + RQD, "Popup", "location=1, status=1, scrollbars=1, resizable=1, directories=1, toolbar=1, titlebar=1, width=1200");}