salesforce - 集成 Salesforce 与 Docusign 无效类型:dfsle.Envelope
问题描述
我正在尝试将 Salesforce 与 DocuSign 与 Docusign Apex 工具包集成,但我的组织中没有 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 设置。在快速查找框中键入已安装的软件包。确保已安装 DocuSign 应用程序启动器。检查包前缀。
推荐阅读
- python - 通过 Anaconda 在 Windows 10 中安装 rpy2,以便它使用已安装的软件包
- function - Google Apps 脚本函数在 for 循环 ISSUE 中调用
- docker - Drupal 容器无法连接到 postgres 容器
- sql - SQL - 连接三个不同列的表
- java - 为什么 volatile 在比较过程中不能解决数据竞争
- locust - 无法从“蝗虫”库中导入名称“用户”
- android - 错误:flutter中不存在包androidx.lifecycle
- reactjs - 将域名指向带有 nodejs 后端的 reactjs 应用程序
- c# - Ef Core 3 .GroupBy() 按日期选择每个组中的一个
- php - 如果分隔的单词包含在字符串中的某个位置,则返回结果 - PHP