My application allows multiple sales quotes to go out in a single pdf packet. At the bottom of each quote is an Accept (quote#) Decline (quote#) radio group. Using the DocuSign API I am attaching a radio group to each of these accept/decline sections on each quote. There is no "required" option at the group level so I set "required" on one of the radio's which makes the group required.
This all works great except the signing flow through the document. If I choose "Accept" which is the first radio and hit "Next" it changes to "Choose" and seems to want me to choose "Decline" as well. If I hit "Choose" it moves on to the next radio group. If I choose "Decline" it moves on to the next radio group as it should (I assume because its the last radio item in the group). If I am at the last radio group I can choose "Accept" and its finished.
It seems like a bug to me since you can only choose a single radio group item, doing so with required should fulfill this requirement with any selection. I would like it to move on to the next radio group after either selection. Has anyone run into this issue and found a work around or solution?
for (var i = 0; i < parts.Count; i++) {
Radio approve = new Radio();
approve.AnchorString = "Accept " + parts[i].Substring(0,parts[i].Length-3) + "-" + parts[i].Substring(parts[i].Length-2,2); approve.Value = "Accept";
approve.Required = "true";
approve.AnchorMatchWholeWord = "true";
approve.AnchorUnits = "pixels";
approve.AnchorXOffset = "-19";
approve.AnchorYOffset = "-4";
Radio decline = new Radio();
decline.AnchorString = "Decline " + parts[i].Substring(0,parts[i].Length-3) + "-" + parts[i].Substring(parts[i].Length-2,2); decline.Value = "Decline";
decline.AnchorMatchWholeWord = "true";
decline.AnchorUnits = "pixels";
decline.AnchorXOffset = "-19";
decline.AnchorYOffset = "-4";
List<Radio> radioVals = new List<Radio>();
radioVals.Add(approve);
radioVals.Add(decline);
RadioGroup rg = new RadioGroup();
rg.GroupName = parts[i].Substring(0,parts[i].Length-3) + "-" + parts[i].Substring(parts[i].Length-2,2);
rg.Radios = radioVals;
signer.Tabs.RadioGroupTabs.Add(rg);
}
Please see the DocuSign blog post Guide Your Signers Through Documents with the Auto-Navigation Feature
Related
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.
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));
I have an xpage with a data view control, that has show checkbox and show header checkbox enabled. I want to be able to provide confirmation with a count of selected documents to the user when they click the submit button.
Example
"Are you sure you want to submit x number of documents?"
My confirm action returns 0 regardless of how many documents I select. What am I doing wrong?
<xp:confirm>
<xp:this.message><![CDATA[#{javascript:var dataView1:com.ibm.xsp.extlib.component.data.UIDataView = getComponent("dataView1");
var val = dataView1.getSelectedIds();
var len = val.length;
return "Are you sure you want to submit " + len + " number of documents?";
}]]></xp:this.message>
</xp:confirm>
The immediate problem that you're running into is that the confirmation message is most likely being computed as the button is rendered the first time - which is to say, when no documents are checked.
Even beyond that, though, the getSelectedIds method is tricky: the selected documents are cleared after each request, so something that would do a request to the server to get the selected ID count would also have the side effect of clearing out the selections.
What may be the way to do here is to do the check client-side with something like this:
<xp:eventHandler ...>
<!-- other action stuff here -->
<xp:this.script><![CDATA[
var count = dojo.query("tbody input[type='checkbox']:checked", dojo.byId("#{id:yourDataViewId}")).length;
return XSP.confirm("Are you sure you want to submit " + count + " document" + (count == 1 ? "" : "s") + "?");
]]></xp:this.script>
</xp:eventHandler>
The Dojo query in there will search for all checked checkboxes inside the body part of the data view (to exclude the header checkbox), restricted to within the specific data view you want to search for. The XSP.confirm client-side method is the same idea as the <xp:confirm/> simple action, and returning the value from it will cancel the submit if the user says no.
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.
How do we filter the dojo grid (extlib component) that gets its data from the REST service component? I have the grid loaded with data from the view correctly from the REST service component. I also have on the xpage a dropdown where users can select a value that's a dbcolumn of one of the columns in the same view. I've tried setting the REST service keys value to viewScope.filterCat01 (which is the variable for the combo box), and I've also tried setting the filter in a button (BY is the field/column name) but nothing seems to filter it. Any ideas? In the button when I check grid properties, it does work, so I know the grid object is valid - but the filter just doesn't seem to be doing anything. I've also tried doing a grid._refresh() as well as setting the Keys in the REST service component with no luck. Is there a special way to trigger the filter?
var filterValue = XSP.getElementById("#{id:comboBox2}").value;
var grid = dijit.byId("#{id:djxDataGrid1}");
grid.filter({ By: filterValue});
This is definitely one of those things that you need to piece together a thousand cryptic clues to work it out (Domino - never!). Anyway, I had to work this one out last year. Here's an example 'search' button:
var searchText = dojo.byId('#{id:searchText}').value.replace(/"/g, '|"');
if (searchText) {
var ftSearchText = '[Title] CONTAINS "' + searchText + '" OR [Description] CONTAINS "' + searchText + '" OR [URL] CONTAINS "' + searchText + '"';
dijit.byId('#{id:grid}').filter('?search=(' + ftSearchText + ')', false);
} else {
dojo.byId('#{id:reset}').click();
}
As you can see, it's doing an ft search when a filter is applied. The key is to put "?search=" on to the beginning of the filter string.
and here's the 'reset' button example:
dojo.byId('#{id:searchText}').value="";
var grid = dijit.byId('#{id:grid}');
grid.filter("",true);
grid.store.close();
grid._refresh();
This was developed with 8.5.2. There might be some cleaner ways to do things in 8.5.3 with dojo 1.6.1.
Enjoy!