0

my UI when create and wh

My code to update:

           var recipients = envelopesApi.ListRecipients(accountId, envelopeId, new EnvelopesApi.ListRecipientsOptions { includeTabs = true.ToString() });

            foreach (var doc in documents)
            {
                var retornoDelete = envelopesApi.DeleteDocuments(accountId, envelopeId, new EnvelopeDefinition { Documents = new List<Document> { doc } });
            }

            var resultUpdateDocuments = envelopesApi.UpdateDocuments(accountId, envelopeId, new EnvelopeDefinition { Documents = envelope.Documents, Recipients = recipients });

            var resultUpdateRecipients = envelopesApi.UpdateRecipients(accountId, envelopeId, recipients, new EnvelopesApi.UpdateRecipientsOptions { resendEnvelope = "true" });

I have try this link bellow, but not work for me: DocuSign: Signer Tabs are lost when updating an envelope

2 Answers2

0

Im not sure what you are trying to do in this code, but you are both updating the recipient and the document. It make a lot more sense to create a new envelope at this point, instead of 3 API calls - you can make just one.

The reason you don't see the tab (SignIn) is because you are updating the recipients and documents again and that won't by itself update the tabs. You need to make yet another API call for this (https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/update/)

I recommend you reconsider this flow to just create a new envelope with all the information in one call. But if you need to do it this way - you'll need another API call.

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
  • * we need keep the same envelope(customer requirements) :( I tried what you suggested, but not work here. This question say about a bug to update the tabs: https://stackoverflow.com/questions/59865511/calling-envelopesapiupdate-document-tabs-returns-an-error But the Create Tabs work here, i guess this will sufficient – Eder Lopes May 04 '21 at 19:42
  • This is about the UpdateRecipientTabs, but you can use UpdateDocumentTabs instead – Inbar Gazit May 04 '21 at 19:46
  • Can you share the code you're trying for updating the tabs and what error exactly you're getting? – Inbar Gazit May 04 '21 at 19:46
  • We are using the C# package DocuSign.eSign, Version=4.4.1.0 I try this UpdateDocumentTabs, but this API need TabId what not exists because I needed delete the document , @Inbar Gazit, if a have any more problem I go back to this question, I am so thankful for your time in this question. – Eder Lopes May 04 '21 at 20:18
  • Happy To help, let me know if you need anything else. – Inbar Gazit May 04 '21 at 20:25
0

the Create Tabs work here, i guess this will sufficient

              foreach (var item in recipients.Signers)
            {
                try
                {
                    var tabsRecipient = envelope.Recipients.Signers.Where(x => x.Email == item.Email).Select(x => x.Tabs).First();
                    var resultUpdateTabs = envelopesApi.CreateTabs(accountId, envelopeId, item.RecipientId, tabsRecipient);
                }
                catch (Exception ex)
                {
                    // this recipient have a constraint
                }                    
            }