03-23-2015 01:06 PM
03-24-2015 07:06 AM
Hello Zolt,
You cannot get E-Form template associated with the Document Type, but you can get Document Type associated with the E-Form template.
We also don't return an E-Form template if "Don't allow form creation" option is checked because doing so will defeat the purpose of that option.
03-24-2015 07:34 AM
If you have the option of using a Unity form for this sub form, you can take advantage of the fact that their permissions are more granular. With an eform, this option affects creation as well as viewing. However, with a Unity Form, you can select specific usergroups whom are allowed to see the Form in the Form list. Since selecting nobody means "everyone", I'd recommend selecting only "Manager". You can still access the template via Unity Scripts this way, but nobody will be able to see the sub form in the list of forms.
03-24-2015 07:37 AM
The Unity form templates are created and stored from a separate factory method and storage action compared to eforms. See here:
private void CreateNewMemberReadyHoldForm(long docHandleNum, string ID, bool flagValue, string status, string notes) { OBConnect(); KeywordType ktDocHandle = core.KeywordTypes.Find("Document Handle"); KeywordType ktGroupNum = core.KeywordTypes.Find("Group#"); KeywordType ktStatus = core.KeywordTypes.Find("Status"); KeywordType ktNotes = core.KeywordTypes.Find("Notes"); Keyword kwDocHandle = ktDocHandle.CreateKeyword(docHandleNum); Keyword kwGroupNum = ktGroupNum.CreateKeyword(ID); Keyword kwStatus = ktStatus.CreateKeyword(status); Keyword kwNotes = ktNotes.CreateKeyword(notes); DocumentType dt = core.DocumentTypes.Find("PRM - Member Ready Hold"); //FileType fileType = app.Core.FileTypes.Find("Electronic Form");//for Eforms FormTemplate template = core.UnityFormTemplates.Find(x => x.Name == "PRM Member Ready Hold"); //Unity Form Template StoreNewUnityFormProperties newFormProps = core.Storage.CreateStoreNewUnityFormProperties(template); newFormProps.AddKeyword(kwDocHandle); newFormProps.AddKeyword(kwGroupNum); newFormProps.AddKeyword(kwStatus); newFormProps.AddKeyword(kwNotes); newFormProps.ExpandKeysets = true; core.Storage.StoreNewUnityForm(newFormProps); OBDisconnect(); }
03-24-2015 07:43 AM
One more thing... in case you edit templates for eforms a lot and are like me (preferring usually to use an open toolbox of queries than click buttons), this will connect your eforms (doctype to active template doc and the doc handle)...
select a.doctype_num, a.doctype, a.doc_handle, a.eformfrom ( select idata.itemnum as doc_handle, dtype.itemtypenum as doctype_num, trim(dtype.itemtypename) as doctype, trim(idata.itemname) as eform, rank() over ( partition by eform.itemtypenum order by eform.itrevnum desc) as rank, eform.itrevnum as revision, decode(idata.status,16,'Yes','No') as deleted from hsi.itemdata idata join hsi.dtelectronicform eform on eform.formitemnum = idata.itemnum join hsi.doctype dtype on dtype.itemtypenum = eform.itemtypenum order by dtype.itemtypenum ) awhere a.rank = 1 and a.deleted = 'No'order by a.doctype ;
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.