DocuSign REST API full name tag - docusignapi

I am creating an envelope using DocuSign REST API with two recipients. Each recipient has two sets of tags - sign here tag and a full name tag.
When an envelope gets created, the sign here tags are showing up correctly for both recipients but the the full name tags for the second recipient is showing up for the first recipient.
I am passing the correct document id and recipient id for both tags in the API request.
Adding my code here..
Public Function SetSignerProperties(ByVal signer As Recipient) As DocuSign.eSign.Model.Signer
Dim dssigner As New DocuSign.eSign.Model.Signer
If Not signer Is Nothing Then
dssigner.Name = signer.name
dssigner.Email = signer.email
dssigner.AccessCode = signer.accesscode
dssigner.AddAccessCodeToEmail = signer.addAccessCodeToEmail
dssigner.Note = signer.note
dssigner.RoutingOrder = signer.routingOrder
dssigner.RecipientId = signer.recipientrecid
If signer.IsCaptiveRecipient Then
dssigner.ClientUserId = signer.recipientrecid
dssigner.EmbeddedRecipientStartURL = signer.embeddedRecipientStartURL
End If
'set up the signer tabs..
AddRecipientTags(signer, dssigner)
End If
Return dssigner
End Function
Public Function AddRecipientTags(ByVal recp As Recipient, ByVal signer As DocuSign.eSign.Model.Signer)
If Not signer Is Nothing Then
If Not recp.tabs Is Nothing Then
signer.Tabs = New DocuSign.eSign.Model.Tabs
For Each currtab In recp.tabs
Select Case currtab.tabType
Case "Sign Here"
'it is a signer tab..
If signer.Tabs.SignHereTabs Is Nothing Then
signer.Tabs.SignHereTabs = New List(Of DocuSign.eSign.Model.SignHere)
End If
Dim signheretab As New DocuSign.eSign.Model.SignHere
If Not currtab.anchorIgnoreIfNotPresent Is Nothing Then
signheretab.AnchorIgnoreIfNotPresent = currtab.anchorIgnoreIfNotPresent
End If
signheretab.AnchorString = currtab.anchorString
signheretab.AnchorUnits = currtab.anchorUnits
signheretab.AnchorXOffset = currtab.anchorXOffset
signheretab.AnchorYOffset = currtab.anchorYOffset
signheretab.ConditionalParentLabel = currtab.conditionalParentLabel
signheretab.ConditionalParentValue = currtab.conditionalParentValue
signheretab.Name = currtab.name
signheretab.Optional = currtab.toptional
signheretab.PageNumber = currtab.pageNumber
signheretab.RecipientId = currtab.recipientId
signheretab.ScaleValue = currtab.scaleValue
signheretab.TabId = currtab.tabId
signheretab.TabLabel = currtab.tabLabel
signheretab.TabOrder = currtab.tabOrder
signheretab.XPosition = currtab.xPosition
signheretab.YPosition = currtab.yPosition
signheretab.DocumentId = currtab.documentId
signer.Tabs.SignHereTabs.Add(signheretab)
Case "Full Name"
If signer.Tabs.FullNameTabs Is Nothing Then
signer.Tabs.FullNameTabs = New List(Of DocuSign.eSign.Model.FullName)
End If
Dim tab As New DocuSign.eSign.Model.FullName
If Not currtab.anchorIgnoreIfNotPresent Is Nothing Then
tab.AnchorIgnoreIfNotPresent = currtab.anchorIgnoreIfNotPresent
End If
tab.AnchorString = currtab.anchorString
tab.AnchorUnits = currtab.anchorUnits
tab.AnchorXOffset = currtab.anchorXOffset
tab.AnchorYOffset = currtab.anchorYOffset
If Not currtab.bold Is Nothing Then
tab.Bold = currtab.bold
End If
tab.ConditionalParentLabel = currtab.conditionalParentLabel
tab.ConditionalParentValue = currtab.conditionalParentValue
tab.DocumentId = currtab.documentId
tab.Font = currtab.font
tab.FontColor = currtab.fontColor
tab.FontSize = currtab.fontSize
tab.PageNumber = currtab.pageNumber
tab.RecipientId = currtab.recipientId
tab.Name = currtab.name
tab.TabId = currtab.tabId
tab.TabLabel = currtab.tabLabel
tab.TabOrder = currtab.tabOrder
tab.XPosition = currtab.xPosition
tab.YPosition = currtab.yPosition
If Not currtab.underline Is Nothing Then
tab.Underline = currtab.underline
End If
signer.Tabs.FullNameTabs.Add(tab)
End Select
Next
End If
End If
End Function
Please advise,
Thanks,
Minal

Related

Receive error when double click data in Listbox

I am newbies in VBA. Recently I have created a "Search Form". The search data have 21 columns which will display in the "Search List Box". Unfortunately, it only can show until 9 columns and will return an error for the 10 and above data. Your guidance is very much appreciated. Below is my code:
Private Sub dtlist_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
CDSv1.dptname.Text = CDSv1.dtlist.Column(1)
CDSv1.dptadd.Text = CDSv1.dtlist.Column(2)
CDSv1.divcom.Text = CDSv1.dtlist.Column(3)
CDSv1.ctcname.Text = CDSv1.dtlist.Column(4)
CDSv1.ctcno.Text = CDSv1.dtlist.Column(5)
CDSv1.nid.Text = CDSv1.dtlist.Column(6)
CDSv1.serno.Text = CDSv1.dtlist.Column(7)
CDSv1.ipinfo.Text = CDSv1.dtlist.Column(8)
CDSv1.snet.Text = CDSv1.dtlist.Column(9)
CDSv1.gateway.Text = CDSv1.dtlist.Column(10) '<---- The error starts here.
CDSv1.vlinfo.Text = CDSv1.dtlist.Column(11)
CDSv1.netcatcom.Text = CDSv1.dtlist.Column(12)
CDSv1.netsubcatcom.Text = CDSv1.dtlist.Column(13)
CDSv1.ispcom.Text = CDSv1.dtlist.Column(14)
CDSv1.snscom.Text = CDSv1.dtlist.Column(15)
CDSv1.cirt.Text = CDSv1.dtlist.Column(16)
CDSv1.bdwh.Text = CDSv1.dtlist.Column(17)
CDSv1.statcom.Text = CDSv1.dtlist.Column(18)
CDSv1.remf.Text = CDSv1.dtlist.Column(20)
End Sub

lotusscript:How to add two or more email id to the Recipients

I have already the lotusscript code which is working correctly But now i have to add one more email id in the Recipient for the below code
Current Code:
Call currdoc.Save(True, False)
Set maildoc2 = New NotesDocument(maildb)
maildoc2.Form = "Menu"
maildoc2.Type = "Color Code"
maildoc2.SendTo = "lotwor#col.com"
maildoc2.Recipients = "lotwor#col.com"
maildoc2.From = "FRIENDS/COLOR"
maildoc2.Body = "This automated email message"
I tried to add one more email id as lotusrt#cot.com using two ways and it is still not working.
first way:
Call currdoc.Save(True, False)
Set maildoc2 = New NotesDocument(maildb)
maildoc2.Form = "Menu"
maildoc2.Type = "Color Code"
maildoc2.SendTo = "lotwor#col.com",lotusrt#cot.com
maildoc2.Recipients = "lotwor#col.com",lotusrt#cot.com
maildoc2.From = "FRIENDS/COLOR"
maildoc2.Body = "This automated email message"
Second Way is like this by creating address code.
Dim addressesss (1 To 2) As String
addressesss(1) = "lotwor#col.com",
addressesss(2) = "lotusrt#cot.com"
Set maildoc2 = New NotesDocument(maildb)
maildoc2.Form = "Menu"
maildoc2.Type = "Color Code"
maildoc2.SendTo = addressesss
maildoc2.Recipients = addressesss
maildoc2.From = "FRIENDS/COLOR"
maildoc2.Body = "This automated email message"
So can anyone tell me what correction need to done for above code such that the emails will be sent to both the email ids and thanks for your help and time.
Now currently the emails are not sending it to the particular recipients.
The second way is correct, but perhaps you have a typo in your second email address?
Dim addresses (1 To 2) As String
addresses(1) = "lotwor#col.com",
addresses(2) = "lotusrt#col.com"
Set maildoc2 = New NotesDocument(maildb)
maildoc2.Form = "Menu"
maildoc2.Type = "Color Code"
maildoc2.SendTo = addresses
maildoc2.Recipients = addresses
maildoc2.From = "FRIENDS/COLOR"
maildoc2.Body = "This automated email message"

Use DocuSign.Integration.Client.dll v1.4, got ACCOUNT NOT AUTHORIZED FOR ENVELOPE with GetRecipientView

The login was using a developer sandbox account. If the recipent email is the same as the sender login acoount email, everything worked fine. But if they are different, the rest error ACCOUNT NOT AUTHORIZED FOR ENVELOPE was thrown when calling envelope.GetRecipientView. The envelop was created successfully. The see my code below.
Private Sub SendDocToSign(ByVal docPDF As Byte())
Dim clsQuote As New clsQuote
Dim objDatabase As New clsDatabase
Try
' configure application's integrator key and webservice url
RestSettings.Instance.IntegratorKey = AppSettings("IntegratorsKey")
RestSettings.Instance.DocuSignAddress = "https://" & AppSettings("PAGE_DOCUSIGN")
RestSettings.Instance.WebServiceUrl = RestSettings.Instance.DocuSignAddress & "/restapi/v2"
RestSettings.Instance.FeatureSetId = "........"
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls Or System.Net.SecurityProtocolType.Ssl3
System.Net.ServicePointManager.Expect100Continue = False
' credentials for sending account
Dim account As Account = New Account()
account.Email = AppSettings("APIUserEmail")
account.Password = AppSettings("Password")
account.ApiPassword = AppSettings("Password")
account.Proxy = New System.Net.WebProxy("Proxy Server", True)
account.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials
' make the Login API call
Dim result As Boolean = account.Login()
If result = False Then
Response.Write("Login Failed: " & result & " " & account.RestError.message)
Return
End If
Dim recipients As Recipients = New Recipients()
Dim signer As Signer = New Signer
signer.email = MyBase.pEmail
signer.name = MyBase.pContactName
signer.recipientId = "1"
signer.routingOrder = "1"
'signer.clientUserId = "1000"
Dim Signers(0) As Signer
Signers(0) = signer
recipients.signers = Signers
Dim tabs As New TabCollection()
Dim tab As New Tab()
tab.pageNumber = 3
tab.xPosition = 31
tab.yPosition = 382
tab.recipientId = "1"
tab.documentId = 1
tabs.signHereTabs.Add(tab)
Dim texttab As New TextTab()
texttab.pageNumber = 3
texttab.xPosition = 31
texttab.yPosition = 475
texttab.recipientId = "1"
texttab.documentId = 1
tabs.textTabs.Add(texttab)
Dim datetab As New DateSignedTab()
datetab.pageNumber = 3
datetab.xPosition = 480
datetab.yPosition = 417
datetab.recipientId = "1"
datetab.documentId = 1
tabs.dateSignedTabs.Add(datetab)
' create envelope object and assign login info
Dim envelope As New Envelope()
envelope.Login = account
' add one signer to the envelope
envelope.Recipients = recipients
' send the envelope immediately (otherwise set to "created" to save as draft envelope)
envelope.Status = "sent"
' email subject is required
envelope.EmailSubject = "Signature Request on Application"
Dim FileName = MyBase.pReferenceNum & AppSettings("PDF_FILE_EXT")
result = envelope.Create(docPDF, FileName)
If result = False Then
Response.Write("Envelope Creation Failed: " & result & " " & envelope.RestError.message)
Return
End If
result = envelope.GetRecipientView("afterDocuSign.aspx", True)
If result = False Then
Response.Write("GetRecipientView Failed: " & result & " " & envelope.RestError.message)
Return
End If
result = envelope.AddTabs(tabs)
If result = False Then
Response.Write("Tab addition failed: " & result & " " & envelope.RestError.message)
Return
End If
MyBase.pEnvelopeID = envelope.EnvelopeId
MyBase.SetQuoteSession()
clsQuote.Put_DocuSign_Rec(envelope.EnvelopeId, MyBase.pReferenceNum, envelope.Status)
Response.Redirect(envelope.SenderViewUrl)
Catch ex As Exception
Throw
End Try
End Sub
Some possible reasons:
Checking on an envelope that was created from another account (ie you can only see envelopes in the same account that you've sent, you were a signer, or if you're an admin in the account.
Wrong environment - i.e. you've created the envelope in production (www) but you are checking on an envelope in your developer sandbox account (demo).
You are not setting the clientUserId property when adding the recipient to the envelope.
The setting that allows Embedded Signing is not enabled in the account you're sending the envelope from.
For this last one all dev sandbox accounts have Embedding enabled by default but if you're testing in demo and it somehow got turned off in your account you'll have to reach out to your account manager or DS support to have enabled. Follow up with the nurture emails you received after account creation if you want to talk to an Account Manager.

How to create a new customer via code

Hello how do I add a new customer with a default contact in my process in code behind.
So far I have this but I need to create a contact object link the two somehow.
PX.Objects.AR.Customer m = new PX.Objects.AR.Customer();
m.AcctCD = "Test1";
m.AcctName = "Joe Bloggs";
m.Type = "CU";
Customers.Insert(m);
Persist();
CustomerMaint graph = PXGraph.CreateInstance<CustomerMaint>();
Customer cust = new Customer();
cust.AcctName = "Company Name";
cust = (Customer)graph.CurrentCustomer.Insert(cust);
Address addr = (Address)graph.Addresses.Current;
addr.AddressLine1 = "Address 1";
addr.AddressLine2 = "Address 2";
addr.City = "City";
addr.State = "State";
addr.PostalCode = "Zip";
addr.CountryID = "Country";
graph.Addresses.Update(addr);
Contact contact = (Contact)graph.DefContact.Current;
contact.ContactType = ContactTypesAttribute.BAccountProperty;
contact.FirstName = "FirstName";
contact.LastName = "Last Name";
contact.EMail = "emaiL#email.com";
contact.WebSite = "www.website.com";
contact.Phone1 = "1234567890";
contact.Fax = "1234567890";
graph.DefContact.Update(contact);
graph.Actions.PressSave();
This what I did seems to work good. Got instance of the customermaint graph. Insert new Customer into currentcustomer and edit current def contact.
PX.Objects.AR.CustomerMaint graph = PXGraph.CreateInstance<PX.Objects.AR.CustomerMaint>();
PX.Objects.AR.Customer m = new PX.Objects.AR.Customer();
m.AcctCD = "Test4";
m.AcctName = "Jo Bloggs";
m.Type = "CU";
graph.CurrentCustomer.Insert(m);
PX.Objects.CR.Contact c = graph.DefContact.Current;
c.ContactType = "AP";
c.FullName = "Joe Bloggs";
c.EMail = "joe#Bloggs.com";
graph.Actions.PressSave();

eConnect 10.0 SLPRSNID & SALSTERR not importing in new line items

The following code helps to import a sales line to an invoice:
Dim LineItems(dtItem.Rows.Count) As taSopLineIvcInsert_ItemsTaSopLineIvcInsert
Dim salesLine As New taSopLineIvcInsert_ItemsTaSopLineIvcInsert
'Create Invoice Sales lines
For Each dr In dtItem.Rows
With salesLine
.CUSTNMBR = dr.Item("acctno")
.SOPNUMBE = invoiceNumber
.SOPTYPE = 3
.DOCID = "STD INV"
.QUANTITY = dr.Item("Qty")
.ITEMNMBR = dr.Item("Item")
.ITEMDESC = dr.Item("Memo")
.UNITPRCE = dr.Item("SalesPrice")
.XTNDPRCE = dr.Item("Credit")
.TAXAMNT = 0
.UOFM = "Each"
.SALSTERR = "GENERAL"
.ReqShipDate = dtHdr.Rows(0).Item("InvoiceDate").ToString()
.FUFILDAT = dr.Item("Date1").ToString()
.ACTLSHIP = dr.Item("Date1").ToString()
'.NONINVEN = 0
.DOCDATE = dtHdr.Rows(0).Item("InvoiceDate").ToString()
.SLPRSNID = "C1"
End With
LineItems(rowCtr) = salesLine
rowCtr = rowCtr + 1
Next
The fields for SLPRSNID & SALSTERR are just ignored. The invoice itself is being created with all the line items. ANY ideas from anyone with experience using this API are appreciated!
Since we are not integrating SOP commissions data, importing SLPRSNID & SALSTERR on line items using code like above is not supported. However, eConnect does expose pre and post stored procedures to customize business logic. The following was added in taSopHdrIvcInsertPost to implement the import:
/** Custom Business Logic */
if ((#I_vSLPRSNID <> '') and (#I_vSALSTERR <> ''))
begin
update SOP10200
set SLPRSNID = #I_vSLPRSNID, SALSTERR = #I_vSALSTERR
where SOPNUMBE = #I_vSOPNUMBE and SOPTYPE = #I_vSOPTYPE
end
/** Custom Business Logic */
NOTE: with this implementation, the specific SLPRSNID & SALSTERR will have to be provided to the line items, it will not automatically post from header data, or any customer setup data in GP - your integration has to pass the values in.

Resources