david.walker

noRolesOnApproval error

0 votes

Hi,

I'm getting a noRolesOnApproval error when trying to create a template that uses the document visibility feature. My code is attached. Any idea how I can fix this?

Thanks.


Approved Answer

Reply to: noRolesOnApproval error

0 votes

Hi David,

 

I saw you defined the placeholder like this:
                .WithSigner(SignerBuilder.NewSignerPlaceholder(new Placeholder("Company"))
                    .WithCustomId("Signer1")
                    .SigningOrder(0)
                    .WithAttachmentRequirement(AttachmentRequirementBuilder.NewAttachmentRequirementWithName("Attachments")
                        .WithDescription("Please upload attachments here.")
                        .Build()))

In this case, the placeholder (and the actual signer who will later replace the placeholder) will have role name of "Company" (This is the label displayed in the UI) and role ID of "Signer1" (This will be used to locate/identify the role). Given this background, you'll need to reference the placeholder as "Signer1" when assigning signature:


               .WithDocument(DocumentBuilder.NewDocumentNamed("GFE Checklist")
                        .WithId("doc1")
                        .FromFile("xxxx")
                        .EnableExtraction()
                        .WithSignature(SignatureBuilder.SignatureFor(new Placeholder("Signer1"))
                                .WithName("Signature1")
                                .WithPositionExtracted()

                                 ...........

 

On top of that, I don't think you will need to send the template at the last step, as the .createTemplate() call is sufficient:
            //client.SendPackage(templateId);

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: noRolesOnApproval error

0 votes

Thanks! This fixed it!


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