Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mtetlow/faf678b1e466197306841c185d6eadb7 to your computer and use it in GitHub Desktop.
Save mtetlow/faf678b1e466197306841c185d6eadb7 to your computer and use it in GitHub Desktop.
<apex:page standardController="TASKRAY__Project__c">
<script src="/apex/dsfs__DocuSign_JavaScript" />
<input class="btn" type="button" id="docusignActionLink" value="Send with DocuSign" />
<script>
var recordId = '{!TASKRAY__Project__c.Id}';
var sendToDocuSign = function(){
var url = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID="+recordId;
var win = window.open(url, '_blank');
win.focus();
}
var button = document.getElementById("docusignActionLink");
button.addEventListener("click", sendToDocuSign);
</script>
</apex:page>
<apex:page standardController="TASKRAY__Project_Task__c">
<script src="/apex/dsfs__DocuSign_JavaScript" />
<input class="btn" type="button" id="docusignActionLink" value="Send with DocuSign" />
<script>
var recordId = '{!TASKRAY__Project_Task__c.Id}';
var sendToDocuSign = function(){
var url = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID="+recordId;
var win = window.open(url, '_blank');
win.focus();
}
var button = document.getElementById("docusignActionLink");
button.addEventListener("click", sendToDocuSign);
</script>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment