DocuSign SOAP API - Custom Tab - Optional Text Field - docusignapi

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

Related

DocuSign Agent/Specify Recipient role

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.

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 to give data dynamically in a dialog box using visual c++

How can I send data to a dialog box dynamically?
In a previous project I used edit boxes (e.g for 3 conductors) and gave those data separately for each conductor. Now I have to give them dynamically and I don't have standard number of conductors and I can't use edit box again.
Could you please give me an idea or a good link describing step by step how to create a table in a dialog box dynamically?
I have created a dialog box in which I insert data about conductors (resistivity, permeability, diameter etc (electric power systems Smile | :) )) in edit boxes but I have done it only for 3 conductors. I have to insert-edit the number of conductors and then edit their characteristics. But I can't use again edit boxes because this is static. I want something like a dynamic table which will have rows=number of conductors and columns about is characteristic (resistivity, permeability, diameter)and edit them in dialog box. I don't know how to upload my executable to male clear what I have done but here is a part of my code for the static case of three conductors Smile | :) I want another dynamic way to edit data :/
void CInputView::OnLinefeaturesFeatures()
{
// TODO: Add your command handler code here
CInputDoc* pDoc = GetDocument();
CFeaturesDialog DialogWindow;
DialogWindow.m_DialogCon = m_NumCond;
DialogWindow.m_DialogLayers = m_Layers;
DialogWindow.m_DialogPermeability = m_AirPermeability;
DialogWindow.m_DialogAirConductivity = m_AirConductivity;
DialogWindow.m_DialogAirPermittivity = m_AirPermittivity;
DialogWindow.m_DialogEarthPermeability1 = m_EarthPermeability1;
DialogWindow.m_DialogEarthConductivity1 = m_EarthConductivity1;
DialogWindow.m_DialogEarthPermittivity1 = m_EarthPermittivity;
DialogWindow.m_DialogDepth = m_depth;
DialogWindow.m_DialogEarthPermeability2 = m_EarthPermeability2;
DialogWindow.m_DialogEarthConductivity2 = m_EarthConductivity2;
DialogWindow.m_DialogEarthPermittivity2 = m_EarthPermittivity2;
DialogWindow.m_Dialogfrequency = m_frequency;
if (DialogWindow.DoModal() == IDOK)
{
m_NumCond = DialogWindow.m_DialogCon;
m_Layers = DialogWindow.m_DialogLayers;
m_AirPermeability = DialogWindow.m_DialogPermeability;
m_AirConductivity = DialogWindow.m_DialogAirConductivity;
m_AirPermittivity = DialogWindow.m_DialogAirPermittivity;
m_EarthPermeability1 = DialogWindow.m_DialogEarthPermeability1;
m_EarthConductivity1 = DialogWindow.m_DialogEarthConductivity1;
m_EarthPermittivity = DialogWindow.m_DialogEarthPermittivity1;
m_depth = DialogWindow.m_DialogDepth;
m_EarthPermeability2 = DialogWindow.m_DialogEarthPermeability2;
m_EarthConductivity2 = DialogWindow.m_DialogEarthConductivity2;
m_EarthPermittivity2 = DialogWindow.m_DialogEarthPermittivity2;
m_frequency = DialogWindow.m_Dialogfrequency;
}
}

How do I disable products in Kentico 10?

I am performing CRUD operations for products of e-commerce site in kentico 10.I can add and update products using below API
SKUInfoProvider.SetSKUInfo(updateProduct);
Also there is an API for deleting product
SKUInfoProvider.DeleteSKUInfo(updateProduct);
But I do not wish to delete the product from database,rather just disable them so that they do not show up to the end users and still stay in the database .
This are the SKU Objects for the product :
var sku = new SKUInfo
{
//SKUName = Convert.ToString(dr["SHORT_DESCRIPTION"]).Trim('"') + " (" + Convert.ToString(dr["MANUFACTURER_PART_NUMBER"]) + ")",
SKUName = Convert.ToString(dr["MANUFACTURER_PART_NUMBER"]),
SKUDescription = Convert.ToString(dr["TECHNICAL_SPECIFICATIONS"]).Trim('"'),
SKUShortDescription = Convert.ToString(dr["SHORT_DESCRIPTION"]).Trim('"'),
SKUPrice = ValidationHelper.GetDouble(dr["RESELLER_BUY_INC"], 0),
SKURetailPrice = ValidationHelper.GetDouble(dr["RRP_INC"], 0),
SKUEnabled = true,
SKUSiteID = siteId,
SKUProductType = SKUProductTypeEnum.Product,
SKUManufacturerID = manufacturer.ManufacturerID,
SKUDepartmentID = department.DepartmentID,
SKUHeight = 100,
SKUWidth = 100,
SKUAvailableItems = 1,
SKUSellOnlyAvailable = true
};
I tried to set SKUEnabled as false but still user can see the product.So, is there any property to disable products ?
How are you displaying the Sku? If it's a repeater, you may need to filter by the "SKUEnabled = 1" in your where condition.
Another option is if the Product has a Page (it's not a stand alone sku) you can unpublish the page itself.
Well... A user doesn't see products per say - he sees pages that are connected to your SKUs/products. When you disable the SKU - the page is still visible, but (if I am not mistaken) "Add To Cart" is not shown. You need to unpublish product pages. You need to set DocumentPublishTo of the document to some date before for ex:
ProductNode.SetValue("DocumentPublishTo", DateTime.Now.AddDays(-1));

Disable/enable an input field

Using this sample code, I am trying to enable/disable the field "arrdatfrom". However, once this text field has been DISABLED, i cannot get it to be re-ENABLED. The function below gets executed when the user clicks a "Refresh" button. I have built this little demo just to prove that I have tried many ways to do this. Any ideas?
function showBooking() {
var d = new Date()
formvals.arrdatefrom = document.getElementById("arrdatfrom").value
formvals.arrdatethru = document.getElementById("arrdatthru").value
formvals.depdatefrom = document.getElementById("depdatfrom").value
formvals.depdatethru = document.getElementById("depdatthru").value
formvals.bookname = document.getElementById("bookname").value
formvals.peakroomfrom = document.getElementById("peakroomfrom").value
formvals.peakroomthru = document.getElementById("peakroomthru").value
formvals.peakattendfrom = document.getElementById("peakattendfrom").value
formvals.peakattendthru = document.getElementById("peakattendthru").value
alert (' ngs.hta ready to enable')
document.getElementById("arrdatfrom").enabled = 'true'
alert ('ngs.hta in showBooking!! disable. ')
document.getElementById("arrdatfrom").disabled = 'true'
...
There is no property .enabled. To re-enable a disabled element, set .disabled = false.

Resources