Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enter code here String templateId = "45deb3ff-6054-4316-bd4d-a3cee82ff527";
- TemplatesApi templateApi = new TemplatesApi();
- EnvelopeTemplate envelopeTemplate;
- try {
- envelopeTemplate = templateApi.get(accountId, templateId);
- List<Document> documentList = envelopeTemplate.getDocuments();
- Document document = documentList.get(0);
- String documentId = document.getDocumentId();
- DocumentFieldsInformation dfi = templateApi.listDocumentFields(accountId, templateId, documentId);
- CustomFields cf= templateApi.listCustomFields(accountId, templateId);
- List<TextCustomField> lcf = cf.getTextCustomFields();
- for(int i = 0; i < lcf.size(); i++) {
- TextCustomField aaa = lcf.get(i);
- }
- List<NameValue> nv = dfi.getDocumentFields();
- Iterator<NameValue> i = nv.iterator();
- while(i.hasNext()) {
- NameValue nv2 = i.next();
- String name = nv2.getName();
- String value = nv2.getValue();
- nv2.setValue("test");
- }
- } catch (ApiException e) {
- }
Add Comment
Please, Sign In to add comment