asp.net - 当我创建带有字段的文档模板时,如果我使用 API 将其发送给其他人,字段会消失吗?
问题描述
ApiClient apiClient = new ApiClient("https://demo.docusign.net/restapi");
List<string> scopes = new List<string>
{
OAuth.Scope_SIGNATURE,
OAuth.Scope_IMPERSONATION
};
docuSign_JWT testConfig = new docuSign_JWT();
testConfig.ApiClient = new ApiClient(testConfig.Host);
// If this is the first time logging in - Get Consent from the user - this is a onetime step.
Uri oauthURI = testConfig.ApiClient.GetAuthorizationUri(testConfig.IntegratorKey, scopes, RedirectURI, OAuth.CODE, "testState");
Process.Start(oauthURI.ToString());
var privateKeyStream = System.Text.Encoding.UTF8.GetBytes(File.ReadAllText(testConfig.PrivateKeyFilename));
OAuth.OAuthToken tokenInfo = testConfig.ApiClient.RequestJWTUserToken(testConfig.IntegratorKey, testConfig.UserId, testConfig.OAuthBasePath, privateKeyStream, testConfig.ExpiresInHours);
apiClient = new ApiClient("https://demo.docusign.net/restapi");
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + tokenInfo.access_token);
EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition();
envelopeDefinition.EmailSubject = "Please sign this document";
envelopeDefinition.TemplateId = "***************";
DocuSign.eSign.Model.TemplateRole cc1 = new DocuSign.eSign.Model.TemplateRole();
cc1.Email = "Email1 default template recipient";
cc1.Name = "Name";
cc1.RoleName = "Staff";
DocuSign.eSign.Model.TemplateRole cc2 = new DocuSign.eSign.Model.TemplateRole();
cc2.Email = "Email2 new email ID";
cc2.Name = "Name2";
cc2.RoleName = "Staff";
DocuSign.eSign.Model.TemplateRole cc3 = new DocuSign.eSign.Model.TemplateRole();
cc3.Email = "Email3 new Email ID";
cc3.Name = "Name3";
cc3.RoleName = "Staff";
List<DocuSign.eSign.Model.TemplateRole> templateRoles = new List<DocuSign.eSign.Model.TemplateRole>();
templateRoles.Add(cc1);
templateRoles.Add(cc2);
templateRoles.Add(cc3);
envelopeDefinition.TemplateRoles = templateRoles;
envelopeDefinition.Status = "sent";
EnvelopesApi envelopesApi = new EnvelopesApi(apiClient);
EnvelopeSummary envelopeSummary = envelopesApi.CreateEnvelope(ConfigurationManager.AppSettings["accountID"], envelopeDefinition);
以上是我发送docuSign模板文档的代码。但只有默认收件人获得带字段的文档,其他收件人仅获得不带字段的 pdf 文件。如何将带有字段的模板文档发送给所有收件人。下面是模板字段 img 谢谢
解决方案
推荐阅读
- sql-server - How can I run SQL commands against dockerized SQL Server via docker-compose?
- r - 从 lme4 中的 VarCorr 对象中提取名称并将其粘贴为列名
- mysql - MySQL data insertion to a newly added column
- mongodb - Id is created for every nested objects in documents of a collection in mongodb via mongoose
- javascript - Cannot escape quotes within a function
- search - How to ignore stop words and use remaining words to fetch expected results alone using Solr?
- c++ - Can you update the g++ command to compile with c++11 by default?
- java - 每次运行 mvn clean install 时,我都会遇到一个非常烦人的错误
- flutter - How to detect zoom change in flutter leaflet map?
- windows - Receiving ssh-key warning inside a Visual-Studio-Code dev-container when pulling/pushing to private Github repo