alfredohrv

Duplicate Require Actions at the time of signing.

0 votes

In the following piece of code I am inserting Check Buttons, thru a list of SignatureDetails. Here I am adding the entries to the 

DocumentBuilder documentBuilder = DocumentBuilder.NewDocumentNamed(document.FileName)
   .WithId(document.Id) // Ensure document ID is set correctly
   .FromStream(fs, DocumentType.PDF);

After the case statement is done with all records I added to the package builder 

packageBuilder.WithDocument(documentBuilder);

At the end I build the Package

var builtPackage = packageBuilder.Build();

and create the package Id

PackageId packageId = _ossClient.CreatePackage(builtPackage);

And send it

_ossClient = new OssClient(credentials.IntegratorKey, credentials.WebUrl);
_ossClient.SendPackage(packageId);

All the way to the end I am checking all the objects and there are no duplicates

Now look at the image at the time of signing. Because there are 2 radio bottoms, the signing ceremony is adding and extra 2 actions and I have no way of clicking  them to finish. BTW I am using Anchor Tags.
  
switch (currentDocumentSignatureDetails[i].Type)
{
   case "DATESIGNED":
       // Skipping DATESIGNED type

       break;
       
   case "CUSTOM":
       var checkBoxField = FieldBuilder.CheckBox()
           .WithName($"{currentDocumentSignatureDetails[i].AnchorTabString}_{currentDocumentSignatureDetails[i].Type}")
           .WithPositionAnchor(new TextAnchor()
           {
               AnchorText = currentDocumentSignatureDetails[i].AnchorTabString,
               Height = currentDocumentSignatureDetails[i].Height,
               Width = currentDocumentSignatureDetails[i].Width,
               YOffset = currentDocumentSignatureDetails[i].YOffset
           })
           .WithSize(currentDocumentSignatureDetails[i].Width, currentDocumentSignatureDetails[i].Height)
           .Build();
           
       checkBoxField.Validator = new FieldValidator { Required = true }; // Make the checkbox required

       // Ensure the position anchor is correctly set
       signatureBuilder
           .WithPositionAnchor(new TextAnchor()
           {
               AnchorText = currentDocumentSignatureDetails[i].AnchorTabString,
               Height = currentDocumentSignatureDetails[i].Height,
               Width = currentDocumentSignatureDetails[i].Width,
               YOffset = currentDocumentSignatureDetails[i].YOffset
           })
           .WithField(checkBoxField);
           
       break;
if (currentDocumentSignatureDetails[i].Type != "DATESIGNED")
{
   // Adding signature to document                                            
   documentBuilder.WithSignature(signatureBuilder);
   Console.WriteLine($"Added entry: {entryKey}");
   addedEntries.Add(entryKey);
}


Reply to: Duplicate Require Actions at the time of signing.

0 votes

Hi Alfredo,

Sorry for the late reply.

I suspect that the checkboxes that you are adding are being duplicated. Could you please provide me with the package id so that I can verify the fields in the package?

Gabriel Cloutier


Reply to: Duplicate Require Actions at the time of signing.

0 votes

Here is my must recent PackageId
XHXmXMyHUG1lhQwnH1UtP4PCboM=
 


Reply to: Duplicate Require Actions at the time of signing.

0 votes

Hi Alfredo,

Thank you for providing the package ID. After looking into it, it seems that one of your checkboxes is present three times. The two duplicates are creating additional required actions. I suspect that it is the one located at the top left of the first image you sent (2024-05-14_12-53-41.png). Here are the IDs of the checkboxes located there:

  1. YDhdGNhg2XEM
  2. goqttYK7JTAI
  3. E5e9SW1YKIwI

Gabriel Cloutier


Reply to: Duplicate Require Actions at the time of signing.

0 votes

Can you tell me how to verify these duplicates before creating the packageId? and after having the packageId how you know there are duplicates, meaning what are you using to see the results by using the PackageId alone?

 


Reply to: Duplicate Require Actions at the time of signing.

0 votes

To access the package, you'll need to do a GET call with the packageId. Look at this forum post for more information: https://community.onespan.com/forum/rest-api-retrieve-package. You could also access it from your browser by changing this URL:

{Environment URL}/api/packages/{package_id}  

Once I had the package, I found the right document and saw there was multiple required checkboxes at the same place.  To help you further, I'd need to see a bigger snippet of your code.
 

Gabriel Cloutier


Reply to: Duplicate Require Actions at the time of signing.

0 votes

So I was able to figure out what I was doing wrong and fixed the code. Here is my latest PackageId =  WG4VNh811i0QE79-Ro3twm3Munw=
 


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off