asimao | Posts: 15

RequiredFields not working

0 votes
Hey there, im having a problem with IsRequired propertie: 1 - Through the management console I created a DocumentTemplate (X) where I define all the fields and properties such as IsRequired. 2- Using the API im building a DocumentPackage where I upload a Document and I apply the template X. 3 - At first sight the template X is assumed because all fields are appearing but in the sign ceremony none of the required fields are being validated (IsRequired=true) and the user can end the ceremony just by signing and not filling the mandatory fields. How can i solve this? SGPICnLHwZiiGhoR63Ik9dtpESo=

Approved Answer
Duo_Liang | Posts: 3776

Reply to: RequiredFields not working

0 votes
Hi asimao, Now I understand your use case! Your previous workflow is fine, the only thing is, you need to update your layout to make the fields mandatory. Simply create another layout with the same name, which will override the existing one. Duo

Duo_Liang | Posts: 3776

Reply to: RequiredFields not working

0 votes
Hi asimao, I've checked the template against the package, and looks like all the 9 required fields in the template are all not mandatory in the package. I created a template with the same fields and signatures, but can't reproduce the issue when I created a package from this template. So here's few questions: (1)Does the issue consistent? If you created another package based the template, do you see the same unexpected behavior? (2)If you create the package from web portal, will you hit the same problem? (3)Did you call the API or SDK to "create the package from template"? Can you share the JSON or the code you used? Duo

asimao | Posts: 15

Reply to: RequiredFields not working

0 votes
Hi Duo_Liang, thanks for the support. 1 - Yes the issue is constant. 2 - If I create by web portal, using the transaction template, it actually works. But by reading your answer I think I didnt explain myself correctly, by API 1- I build a package by template (the one you mentioned) - all good here 2- I added a document eslClient.UploadDocuments(mypackage.Id, new List() { doc }); 3- I applyed to the document a Layout ( eslClient.LayoutService.ApplyLayoutByName(mypackage.Id, mypackage.Documents[1].Id, "Layout_########_####_2019"); 4 - Now if I iterate through Fields of the mypackage.Documents[1].Signatures, I see all fields from the Layout and the propertie isRequired is correctly defined. (Most of the mandatory fields are for CustomId= "29ae46c6-a5ec-4919-98ae-7589d9e1263d") Soo if apply a "layout" to a document and i can see all fields and the properties of each one, IsRequired included, why do you say that " looks like all the 9 required fields in the template are all not mandatory in the package" ?

Duo_Liang | Posts: 3776

Reply to: RequiredFields not working

0 votes
Hi asimao, I see, I checked the layout under your account and found that all fields are NOT required. Few thinkings for this issue: (1)if you already create a package out of a template (your template includes the document and all the fields for this document), why you still need to apply the layout(all the fields for a particular document)? (2)if you want to check your layout, you'd follow this process: -log onto your web portal to get a browser cookie -once logged in, hit this link:https://sandbox.esignlive.com/a/transaction/eXHfOpkgH9LYfyQpP7TgD7IkNkM=/design, which will bring you to the layout designer page where you will see all the fields are NOT required there. ("eXHfOpkgH9LYfyQpP7TgD7IkNkM=" is your layout ID, matches the name of "Layout_########_####_2019") Duo

asimao | Posts: 15

Reply to: RequiredFields not working

0 votes
Hey Duo_Liang, thanks for the replie. (1) in each transaction i need to customize the signers and i need to replace the document with a specific one, but maintaining the fields and their properties (for that I was applying the layout) By that I thought I had to upload the new document and apply the layout. (2) I checked the link and now i understand that what your saying. Soo how can I do step 2 by API: step 1 - created a transaction by template, customized the signers (done and ok) step 2 -need to replace the document with a specific one (Z) ,but maintaining the fields and their properties of the template/layout ? (Z is a document with same structure but some data changed).

asimao | Posts: 15

Reply to: RequiredFields not working

0 votes
Hum... Soo i can't edit the existing layout, i have to create another one with the same name. ok, gonna try this. In the transaction build with tneplate, to replace the default document only need to upload a document ( eslClient.UploadDocument) with the Id of previous document?

Duo_Liang | Posts: 3776

Reply to: RequiredFields not working

0 votes
Hi asimao, Actually you can edit the existing layout: update the fields in the link I provided above, you don't need to resend or save the layout, it's saved automatically (just in most cases, users don't know how to view the layout by building the link I provided above) To replace the document, the easiest way is to use the same document ID to override the existing document, instead of using a two-step approach to delete then upload. Duo

asimao | Posts: 15

Reply to: RequiredFields not working

0 votes
Worked but it wasn't suppose to be that hard!!! If I CreatePackageFromTemplate, then set Attributes of my package and later UploadDocument, it didnt work!!! For it to work i had to CreatePackageFromTemplate and then immediately do the UploadDocument. Why is this so tricky!!!?

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