I’ve got a workflow that attaches a file to a record in Epicor. I would like to automate the workflow but am concerned about versioning/revisions getting attached to the same Epicor record as a new document instead of a new version of the existing one. I’ve generated a SQL statement that will identify if there is already a record but I don’t know how to version the current document? I don’t see anywhere to put in the XFileRefNum in to identify it as the same record.
In 21.1 they added custom version numbers which you enable in Content builder. According to the relase notes at the link below the client would get a dialog of the version and have the ability to change it. I would enable it on a dev system and then attach the same document a few times to see if it triggers.
You’re correct Greg - but those release notes specifically detail that you can only control the format of the version number, not the process to generate it.
That sysconfig entry is exactly what allows the ERP UI to work correctly. I did misspeak earlier and say that the UI won’t do it - it will because of that setting - but there is no control of that inside the UI to make it specific to a Doc Type - that I have found yet. And the APR “put Document” widget does it automatically - no manual control - and it doesn’t use the sysconfig setting because mine is set to prompt yet the widget automatically versions.
Just got off the phone with Epicor Support. He confirms that our information here is correct, and that he does not know if any additional control over versioning is ‘in the pipeline’. he’s going to do some research and get back to us.
Also - anyone know how to delete a document in the workflow? how about “Un-Attach a File from ERP”? These two things are also not available and I’ve asked him to look into these as well.
True, but it would give you a clue that it was versioning if the dialog came up. I am working on SOA today, so I just set them and will see if they do anything.
Using a search task then Remove from folder or remove from all folders should be able to remove the document from ECM. With the documentID as a parameter a datalink to remove the xfileref record should clear the attachment.
The dialog comes up in the ERP UI’s File Attach process if the sysconfig is set to ‘prompt’ but it doesn’t give you any control over the version numbers - it just asks if you want to create a new version or a new document. And as far as I know, the only place you can create custom version #s is inside ECM after you turn on that checkbox.
Remove from All folders doesn’t actually remove it from ECM completely - we use it in most of our workflows to move documents from the temp workflow location to it’s final place. We use a combination of Remove from All Folders and Add to Folder tasks because there is no ‘move to folder’ task.
Also, since is no Delete task, I found that you cannot use the Recycle Bin as the destination of Add to Folder…
Are you saying create a datalink that is actually a SQL delete statement? I suppose that would work, but can you even do that? It would have to touch both the xFileRef and xFileAttach tables but it also violates the Epicor Prime Directive - no direct DB manipulation. I’d rather have someone wrap the ERP REST document attach API calls in a few datalinks within the integration - that way there is no worry on my part and Epicor can support it.