繁体   English   中英

如何使用 Docu Sign API 工具包命名文档

[英]How to name a Document with Docu Sign API tool kit

我正在使用 DocuSign Apex Toolkit 创建签名者文档。 一切正常,但是当文档附加到 Salesforce 文件时,文档文件名设置为“Name.pdf”。 我想重命名文档。 如何从 Apex Toolkit 设置文档名称? 有没有办法使用 APEX DocuSign 工具包传递自定义页面名称

 Id mySourceId; // The ID of the initiating Salesforce object. // Create an empty envelope. dfsle.Envelope myEnvelope = dfsle.EnvelopeService.getEmptyEnvelope( new dfsle.Entity(mySourceId)); // The initiating Salesforce entity. //Use myEnvelope for later //we will use a Salesforce contact record as a Recipient here Contact myContact = [SELECT Id, Name, Email FROM Contact LIMIT 1]; //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 //add Recipient to the Envelope myEnvelope = myEnvelope.withRecipients(new List<dfsle.Recipient> { myRecipient }); //myTemplateId contains the DocuSign Id of the DocuSign Template dfsle.UUID myTemplateId = dfsle.UUID.parse('01234567-xxxx-xxxx-xxxx-456789abcdef'); //create a new document for the Envelope dfsle.Document myDocument = dfsle.Document.fromTemplate( myTemplateId, // templateId in dfsle.UUID format 'myTemplate'); // name of the template //add document to the Envelope myEnvelope = myEnvelope.withDocuments(new List<dfsle.Document> { myDocument }); // Send the envelope. myEnvelope = dfsle.EnvelopeService.sendEnvelope( myEnvelope, // The envelope to send true); // Send now?

Apex Toolkit 不使用文件名,它使用文件 ID。 查看以上内容并在我的沙箱中对其进行测试表明模板名称或您的代码可能是问题所在。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM