We have introduced a new feature that streamlines document archival by automatically sending templates and files linked to a form directly to EPC.
How It Works:
Upon the feature’s activation in a form, a new folder is automatically created within the specified EPC document folder or set. This new folder, timestamped with the date and time of creation for easy reference, contains the generated form template along with any attached files.
- Additionally, if configured for archival, the reference ID will be used to uniquely identify the newly created folder.
How to Implement:
This feature can be adapted to various scenarios, offering flexibility in its application.
To implement the primary use case, however, wherein the feature is triggered upon form submission, follow these steps:
- Create Post-Form Action: Begin by creating and saving a post-form action for the form.
- Launch Code Designer: Launch the Code Designer for the post-form action by clicking the Edit Code option in either the menu bar or the context menu (accessible via right-click).
- Add, Build, & Save Code: In the Code Designer, input and save the following code snippet:
var errors = new List<string>();
if (bpmAppService.BPMSServices.EPCService.Login(out errors))
{
bpmAppService.BPMSServices.EPCService.ArchiveTemplateWithAttachments("EPCFolderID", new List<string> {domainObject.FileAttachmentAttribute}, domainObject.ReferenceID);
}
- Link Action to Form Behavior: Finally, link the post-form action to the relevant form behavior.