集成Salesforce与Docusign无效类型:dfsle.信封



我正在尝试将Salesforce与DocuSign与DocuSign Apex Toolkit集成,但dfsle类在我的组织中不可用。我安装了Apex工具包(https://developers.docusign.com/docs/salesforce/how-to/apex-toolkit-install/)

Id MySourceId = '00Q0m00000884XXXXX';
dfsle.Envelope myEnvelope = dfsle.EnvelopeService.getEmptyEnvelope(new dfsle.Entity(mySourceId));
Lead myContact = [SELECT Id, Name, Email FROM lead where id = '00Q0m00000884XXXX'];
//use the Recipient.fromSource method to create the Recipient
dfsle.Recipient myRecipient = dfsle.Recipient.fromSource(
myContact.Name, // Recipient name
myContact.Email, // Recipient email
null, //Optional phone number
'Signer 1', //Role Name. Specify the exact role name from template
new dfsle.Entity(myContact.Id)); //source object for the Recipient

dfsle.UUID myTemplateId = dfsle.UUID.parse('28386dbc-2576-4637-bb77-c86938fe080f');
//create a new document for the Envelope
dfsle.Document myDocument = dfsle.Document.fromTemplate(
myTemplateId, // templateId in dfsle.UUID format
'Self Sales Teste'); // name of the template
// Send the envelope.
myEnvelope = dfsle.EnvelopeService.sendEnvelope(
myEnvelope, // The envelope to send
true); // Send now?

try {
dfsle.EnvelopeService.sendEnvelope(envelope, true);
} catch (dfsle.APIException ex) {
if (ex.error.code == dfsle.APIErrorCode.CONSENT_REQUIRED) {
// user is a valid member of the DocuSign account, but has not granted consent to this application 
} else {
// handle other errors
}
}
Error: Line: 3, Column: 1
Error: Invalid type: dfsle.Envelope

几周前也有同样的问题:(转到Salesforce设置。在快速查找框中键入Installed Packages。确保已安装DocuSign应用程序启动器。检查包前缀。

最新更新