• Marcel Hobizal
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
First, I'm not a programmer, but know enough to be dangerous!  This is a Custom List View button on the Contact Record using the DocuSign script.  I'd like to loop around the DocuSign java.

My error is I do not understand how to push the correct SourceID into the DocuSign script from the array that is stored.  I need to send one contact ID (SourceID={!Contact.Id}) to the Page Callout routine below.  

How do I do that or is that even possible?

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} 

var records = {!GETRECORDIDS($ObjectType.Contact)};
var strIDs=''; 
if (records[0] == null) 

alert('Please select a record'); 

else 

for (var n=0; n<records.length; n++) 

if(strIDs == '') 
strIDs = records[n]; 
else 
strIDs = strIDs + "," + records[n] ; 



{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
//********* Option Declarations (Do not modify )*********//
var RC = ''; var RSL=''; var RSRO=''; var RROS=''; var CCRM='';
var CCTM=''; var CCNM=''; var CRCL=''; var CRL=''; var OCO='';
var DST=''; var LA=''; var CEM=''; var CES=''; var STB='';
var SSB=''; var SES=''; var SEM=''; var SRS=''; var SCS ='';
var RES=''; 
//*************************************************// 
CRL = 'Email~{!Contact.Email};LastName~{!JSENCODE(Contact.LastName)};Role~A;RoutingOrder~1';
CCRM = 'A~Signer 1';
CCTM = 'A~Signer';
CRCL = '';
OCO = 'Send'; 
DST = 'ABD09037-D838-4FB7-AB14-6C685547DD4B'; 
LA = '0'; 
CEM = ''; 
CES = ''; 
RES = ''; 
CES = '{!JSENCODE(Contact.Name)} - HR Documentation Packet 2015';
CEM = '{!Contact.FirstName},\\n\\nPlease review, complete and sign the attached HR Documentation Packet 2015.\\n\\nKind Regards,\\n{!User.FirstName}\\n\\n{!User.FirstName} {!User.LastName}\\n{!User.Title}\\n\\nMain {!User.Main_Phone__c}\\nDirect {!User.Phone}\\nFax {!User.Fax}';
//********* Page Callout (Do not modify) *********// 
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Contact.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;
//*******************************************/

}
}
First, I'm not a programmer, but know enough to be dangerous!  This is a Custom List View button on the Contact Record using the DocuSign script.  I'd like to loop around the DocuSign java.

My error is I do not understand how to push the correct SourceID into the DocuSign script from the array that is stored.  I need to send one contact ID (SourceID={!Contact.Id}) to the Page Callout routine below.  

How do I do that or is that even possible?

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} 

var records = {!GETRECORDIDS($ObjectType.Contact)};
var strIDs=''; 
if (records[0] == null) 

alert('Please select a record'); 

else 

for (var n=0; n<records.length; n++) 

if(strIDs == '') 
strIDs = records[n]; 
else 
strIDs = strIDs + "," + records[n] ; 



{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
//********* Option Declarations (Do not modify )*********//
var RC = ''; var RSL=''; var RSRO=''; var RROS=''; var CCRM='';
var CCTM=''; var CCNM=''; var CRCL=''; var CRL=''; var OCO='';
var DST=''; var LA=''; var CEM=''; var CES=''; var STB='';
var SSB=''; var SES=''; var SEM=''; var SRS=''; var SCS ='';
var RES=''; 
//*************************************************// 
CRL = 'Email~{!Contact.Email};LastName~{!JSENCODE(Contact.LastName)};Role~A;RoutingOrder~1';
CCRM = 'A~Signer 1';
CCTM = 'A~Signer';
CRCL = '';
OCO = 'Send'; 
DST = 'ABD09037-D838-4FB7-AB14-6C685547DD4B'; 
LA = '0'; 
CEM = ''; 
CES = ''; 
RES = ''; 
CES = '{!JSENCODE(Contact.Name)} - HR Documentation Packet 2015';
CEM = '{!Contact.FirstName},\\n\\nPlease review, complete and sign the attached HR Documentation Packet 2015.\\n\\nKind Regards,\\n{!User.FirstName}\\n\\n{!User.FirstName} {!User.LastName}\\n{!User.Title}\\n\\nMain {!User.Main_Phone__c}\\nDirect {!User.Phone}\\nFax {!User.Fax}';
//********* Page Callout (Do not modify) *********// 
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Contact.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;
//*******************************************/

}
}