Error creating package using Apex SDK
Friday, November 25, 2016 at 12:08pmA client is receiving an error, they are trying to add a second signer to a package. This second signer will always be the same individual and will be signing after the first signer has signed. They have created a Signer Label within the Convention and added the signer 2 information to the button that creates the document. When trying to test results in the error below.
Screen shot attached - SecondSigner.png;
Please find below the code used to create the button and the screen shots of the convention.
OnClick JavaScript {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
var ParentObjectId = '{!Lead.Id}';
var PackageName = '{!Lead.Name}';
var SignerId = '{!Lead.Id}';
var Send = true;
var congaParameters = "SessionId={!API.Session_ID}&ServerUrl={!API.Partner_Server_URL_210}&Id={!Lead.Id}&TemplateId=a0T4B000000NqeL&ds7=5&defaultPDF=0&OCNR=1&OFN={!Lead.LeadSource}+ +{!Lead.Inn_code__c}+ +{!Lead.Today_s_Date__c}+ +{!Lead.Company}&UF0=1&MFTS0=Status&MFTSValue0=Proposal+Sent";
//Change popup visual here
var popup = window.open("https://composer.congamerge.com?"+ congaParameters,'Conga','menubar=no, scrollbars=no, top=200, left=200, width=500, height=200');
//Do not modify below this line
var timer = setInterval(function() {
if(popup.closed) {
clearInterval(timer);
var attach = sforce.connection.query("select id from attachment where ParentId ='"+ ParentObjectId+"' order by createddate desc limit 1");
if(attach.records != null)
{
var packageParameters=
'ParentId='+ParentObjectId
+ '&Name=' + PackageName + '&Documents=' + attach.records.Id
+ '&Signer1=' + SignerId
+ '&ConventionId=a104B000000W0KS'
+ '&Signer1Label=a1C4B000000dGdl'
+ '&Signer2Label=a1C4B000000ehku'
+ '&retURL={!URLENCODE(Lead.Id)}' ;
if(Send)
{
packageParameters += '&Send=0';
}
window.location = '/apex/esl__Package?' + packageParameters;
}
else
{
window.reload();
}
}
}, 500);
Any Suggestions?
Reply to: Error creating package using Apex SDK
Monday, November 28, 2016 at 05:04am