В сгенерированном документе DS поле Имя заполняется именем и фамилией без пробела (BrackObama), мы хотим пробел между fn и ln (Барак Обама). Как мне добавить пробел? Я не уверен
Я генерирую конверт и документ с помощью API DS SF. Когда я пытаюсь добавить пробел между ними, я не могу и получаю следующее исключение.
System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: The recipient you have identified is not a valid recipient of the specified envelope. faultcode=soap:Client faultactor=https://demo.docusign.net/api/3.0/dsapi.asmx
// Recipient
DocuSignAPI.Recipient recipient = new DocuSignAPI.Recipient();
recipient.ID = 1;
recipient.Type_x = Constants.const_Signer;
recipient.RoutingOrder = 1;
recipient.Email = cnt.EmailAddress1__c;
recipient.RoleName = Constants.const_RoleCustomer;
recipient.UserName = cnt.FirstName__c + cnt.LastName__c; //tried adding a space here...
recipient.RequireIDLookup = false;
recipient.captiveInfo = new DocuSignAPI.RecipientCaptiveInfo();
recipient.captiveInfo.ClientUserId = clientUserID;
DocuSignAPI.ArrayOfRecipient1 Recipients = new DocuSignAPI.ArrayOfRecipient1();
Recipients.Recipient = new DocuSignAPI.Recipient[1];
Recipients.Recipient[0] = recipient;
envelope.Recipients = new DocuSignAPI.ArrayOfRecipient();
envelope.Recipients.Recipient = new DocuSignAPI.Recipient[1];
envelope.Recipients.Recipient[0] = recipient;
envelope.AccountId = objConstantSetting.Docusign_Account_ID__c;
envelope.Autonavigation = true;
// Envelope needs Documents, Recipients, Tabs and a Subject.
envelope.Tabs = new DocuSignAPI.ArrayOfTab();
envelope.Tabs.Tab = new List<DocuSignAPI.Tab>();
DocuSignAPI.Tab t = new DocuSignAPI.Tab();
t.Name = 'Name';
t.Type_x = 'FullName';
DocuSignAPI.AnchorTab at = new DocuSignAPI.AnchorTab();
at.AnchorTabString = dsTag.AnchorTabString__c;
t.RecipientID = recipient.ID;
t.CustomTabRequired = true;
at.IgnoreIfNotPresent = true;
t.AnchorTabItem = at;
envelope.Tabs.Tab.add(t);
envelope.Subject = Label.Docusign_Email_Subject; // + account.AccountNumber;