DocuSign Agent/Specify Recipient role - docusignapi

We are using DocuSign's RESTful APIs to create and send envelopes for our clients for last few years with .net framework. We have encountered a strange issue using the Approve tab with a few of our clients' accounts. For some clients' accounts, we are able to add the Approve tab fine while we are receiving an exception while adding the Approve tab for other client accounts. Here is how we are adding the Approve tab from our codebase.
If signer.Tabs.ApproveTabs Is Nothing Then
signer.Tabs.ApproveTabs = New List(Of DocuSign.eSign.Model.Approve)
End If
Try
Dim approvatab As New DocuSign.eSign.Model.Approve
If Not currtab.anchorIgnoreIfNotPresent Is Nothing Then
approvatab.AnchorIgnoreIfNotPresent = currtab.anchorIgnoreIfNotPresent
End If
approvatab.AnchorString = currtab.anchorString
approvatab.AnchorUnits = currtab.anchorUnits
approvatab.AnchorXOffset = currtab.anchorXOffset
approvatab.AnchorYOffset = currtab.anchorYOffset
If Not currtab.bold Is Nothing Then
approvatab.Bold = currtab.bold
End If
approvatab.ButtonText = currtab.buttonText
approvatab.ConditionalParentLabel = currtab.conditionalParentLabel
approvatab.ConditionalParentValue = currtab.conditionalParentValue
approvatab.Font = currtab.font
approvatab.FontColor = currtab.fontColor
approvatab.FontSize = currtab.fontSize
approvatab.Height = currtab.height
If Not currtab.italic Is Nothing Then
approvatab.Italic = currtab.italic
End If
approvatab.PageNumber = currtab.pageNumber
approvatab.RecipientId = currtab.recipientId
approvatab.TabId = currtab.tabId
approvatab.TabLabel = currtab.tabLabel
approvatab.TabOrder = currtab.tabOrder
If Not currtab.underline Then
approvatab.Underline = currtab.underline
End If
approvatab.Width = currtab.width
approvatab.XPosition = currtab.xPosition
approvatab.YPosition = currtab.yPosition
approvatab.DocumentId = currtab.documentId
signer.Tabs.ApproveTabs.Add(approvatab)
Catch ex As Exception
Dim errmsg As String = ex.Message.ToString
End Try
The exception that we are getting while adding the Approve tab is
"Conversion from string "false" to type 'Long' is not valid"
The same code works fine for some of our clients' accounts and we are able to add the Approve tab fine.
Please advise,
Minal

Here are some recommendations:
Consider using the eSign Nuget Package. It works for VB code as well as C# code. Since it's generated from the swagger file of the DocuSign eSignature REST API it is always consistent with the latest API.
Make sure to use the v2.1 version of the eSign API and not version 2.0
Note that sometimes the API expect "false" and other times false for a Boolean value (meaning it's a string in some cases whereas it's a Boolean in the JSON in others). It's possible that there are temporary differences between customers' accounts configurations, but in the long term if you use the latest eSign API - they should behave the same.
Lastly, it could be a case of a misleading error message which hides the real issue with the account. If the issue persists I would advise to contact customer support with account numbers to try to find out.

Related

DocuSign Anchor Tab Not Modifiable

I am using DocuSign SOAP API in C# .NET application. I need to add an anchortab for the Company name. The tab is added but is modifiable by the signer. How do I disable so that the signer can not modify the value? The code is as below.
tab18 = new DocuSignAPI.Tab();
tab18.RecipientID = rcpt1.ID;
tab18.PageNumber = "17";
tab18.DocumentID = docId;
tab18.Type = DocuSignAPI.TabTypeCode.Company;
tab18.AnchorTabItem = new DocuSignAPI.AnchorTab();
tab18.AnchorTabItem.AnchorTabString = "Company Name:";
tab18.AnchorTabItem.Unit = DocuSignAPI.UnitTypeCode.Pixels;
tab18.AnchorTabItem.YOffset = 0;
tab18.AnchorTabItem.XOffset = 50;
You should be able to achieve the behavior you've described by setting the tab's Locked property to true. For info about tab properties, see the EnvelopeRecipientTabs page in the DocuSign API docs.

How do I query security related Win32_NTLogEvent in Delphi

I'm trying to make a translation to Delphi of a VBScript code to detect login attempts, looking for wmi code in Delphi I've found this page theroadtodelphi.com that provide code and samples, of wmi querying all of them work fine but when I try the following query (the one from the script)
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance ISA 'Win32_NTLogEvent' AND TargetInstance.Logfile = 'Security' AND TargetInstance.EventType = 5 AND (TargetInstance.EventIdentifier = 529 OR TargetInstance.EventIdentifier = 4625) AND (TargetInstance.SourceName = 'Security' OR TargetInstance.SourceName = 'Microsoft-Windows-Security-Auditing')"
It gets nothing, It seems that security events require special treatment so digging in script code I found a special way of creating wmi object:
Set objWMIService = GetObject("winmgmts:{(security)}!root/cimv2")
' Create event sink to catch security events
Set objEventSink = WScript.CreateObject("WbemScripting.SWbemSink", "eventSink_")
objWMIService.ExecNotificationQueryAsync objEventSink, "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance ISA 'Win32_NTLogEvent' AND TargetInstance.Logfile = 'Security' AND TargetInstance.EventType = 5 AND (TargetInstance.EventIdentifier = 529 OR TargetInstance.EventIdentifier = 4625) AND (TargetInstance.SourceName = 'Security' OR TargetInstance.SourceName = 'Microsoft-Windows-Security-Auditing')"
I don't get a way to create wmi object with those attributes.
Can some guide me to correct path on how create wmi object in Delphi with desired attributes?

DocuSign SOAP API - Custom Tab - Optional Text Field

We are setting up the document to have an optional text field. We are using DocuSign SOAP API.
We have added Tab configuration, with anchor string, to specify details of custom Text box. The text box appears in the document, but it's always mandatory. Here is the configuration which we setup.
I have gone through various DocuSign support tickets, and community but couldn't find a solution for the same. Please let us know if there is anything missing, or we have a workaround for the same.
I don't see the definition of CustomTabRequiredSpecified in wsdl.
Snippet
Tab.RecipientID = "1"
Tab.DocumentID = "1"
Tab.Type = "Custom"
Tab.AnchorTabItem.AnchorTab.XOffset = 0
Tab.AnchorTabItem.AnchorTab.YOffset = 0
Tab.AnchorTabItem.AnchorTab.IgnoreIfNotPresent = True
Tab.AnchorTabItem.AnchorTab.AnchorTabString = "AnchorString"
Tab.CustomTabWidth = 100
**Tab.CustomTabRequired = False**
Tab.CustomTabType = "Text"
Tab.TabLabel = "UniqueNameField"
Tab.TemplateRequired = False
Tab.SharedTab = True
Tab.RequireAll = False
I was able to make the text tab optional with these 2 lines of code:
Tab.CustomTabRequired = false;
Tab.CustomTabRequiredSpecified = true;
Please make sure you are referencing this WSDL: https://www.docusign.net/api/3.0/dsapi.asmx?wsdl

SharePoint document library versioning and require check out settings using web services

I need the information about the SharePoint document library. Namely, I need the info whether the versioning is turned on or off and if the "require check out" option is selected. I have to use SharePoint web services.
I have looked up in Versions.asmx, Lists.asmx and SiteData.asmx, but found no method or properties that suit my needs.
Could anyone help me out please? Thanks.
You will need to make use of the lists.asmx GetList method. It returns all of the metadata about a list.
Here's some code I've been using in combination with Linq to XML:
Private _serviceRefrence As SharePointListsService.ListsSoapClient
Dim endPoint As New ServiceModel.EndpointAddress(_serviceURL)
Dim ListID as Guid = New Guid("<<Your List Guid>>")
_serviceRefrence = New SharePointListsService.ListsSoapClient("ListsSoap", endPoint)
_serviceRefrence.ClientCredentials.Windows.ClientCredential = Credentials
_serviceRefrence.ClientCredentials.Windows.AllowedImpersonationLevel = Security.Principal.TokenImpersonationLevel.Impersonation
Dim results As XmlElement = _serviceRefrence.GetList(listID.ToString())
Dim parserResults As XDocument = XDocument.Parse(results.OuterXml)
Dim listinfo = (From list In parserResults.Descendants(XName.Get("List", "http://schemas.microsoft.com/sharepoint/soap/")) _
Select New With {.RequireCheckout = list.Attribute("RequireCheckout").Value, _
.ModerationEnabled = list.Attribute("EnableModeration").Value, _
.VersioningEnabled = list.Attribute("EnableVersioning")}).Single()
Hope this helps!

How can I delete a SharePoint sub site using SharePoint web services?

I am forced to use SharePoint web services. I need a web service which will let me delete the SharePoint sub site. I have tried to use DeleteWorkspace method (Meetings.asmx web service), but it is capable of only deleting the sub sites that are meeting workspaces (mine uses a custom template derived from team site). Any help would be appreciated, thanks.
Amazingly! No you can't do it.... I know! weird that it would left out. I'm sure there was a decision made somehwere about but beats me if I know why.
The only option is to deploy custom code - either an event receiver or a web service.
Unfortunately this isn't possible with the out-of-the-box web services. (They only have functionality for deletion at the site collection level.)
You would need to develop a custom web service and deploy that to your SharePoint farm.
If you upgrade to SharePoint 2013, there is a new method in the Sites web service: DeleteWeb. It expects URL of the subsite to delete, relative to the site that you connected the web service to.
--- Ferda
like Ben Says, using /_vti_bin/Dws.asmx should be works. Here's another example
public bool DeleteSubSite(string urlSubSite, string user, string passw, string domain)
{
bool retValue = true;
Dws docWS = new Dws();
docWS.Url = urlSubSite + "/_vti_bin/Dws.asmx"; ;
docWS.Credentials = new System.Net.NetworkCredential(user, passw, domain);
try
{
docWS.DeleteDws();
}
catch (SoapException soex)
{
retValue = false;
}
return retValue;
}
If you want to delete a site try using the dws webservice.
I used DWS.DeleteDWS() where the functoins get_constant etc. simple get back constants for login and webservices like _vti_bin/dws.asmx
Public Function RemoveWSSSite(ByVal sPath As String, ByVal sSubSiteName As String) As Boolean
Dim DTConstant As New DTFrameWork.DTConstant
Dim SPDWS1 As New SPDws.Dws
Dim sSubsiteURL As String = ""
If (sSubSiteName = "") Then
sSubsiteURL = ""
Else
sSubsiteURL = sSubSiteName & "/"
End If
SPDWS1.PreAuthenticate = True
SPDWS1.Credentials = New System.Net.NetworkCredential(DTconst.Get_Constant_String_Value("SP_m_AdminUser"), DTconst.Get_Constant_String_Value("SP_m_AdminPassword"), DTconst.Get_Constant_String_Value("SP_m_SiteDomain"))
SPDWS1.Url = DTconst.Get_Constant_String_Value("SP_m_SiteServerName") & IIf(sPath.StartsWith("/"), "", "/") & sPath & IIf(sPath.EndsWith("/"), "", "/") & sSubsiteURL & DTconst.Get_Constant_String_Value("SP_m_dws_asmx")
Try
SPDWS1.DeleteDws()
Return True
Catch ex As Exception
Return False
End Try
End Function

Resources