Automatically create a document from template using Object Creator or Property Calculator

Hi,

We have a customer who needs to trigger creation of a new document from an existing M-Files template based on a related object workflow state. I am aware that Object Creator and Property Calculator can create a new object based on a related object trigger, but I am yet to work how if or how either module can select a document template for the new object.

The configuration is based around a metadata-only object called SWMS (Safe Work Method Statement). When the SWMS objects reaches a certain state in its own workflow, the solution needs to create a Risk Assessment document from an existing M-Files template and tag it to the SWMS object.

Does anyone know how to configure Object Creator or Property Calculator to select the M-Files template when triggering creation of the document, or would this require VB scripting to achieve?

Many thanks,

Matt

Parents
  • To cover this use case, I usually store the template in some relationship (eg on SWMS object, I would have a "Risk Assessment Template" property set towards your template document), then call the CreateObject method with 'Create as a copy' parameter as Yes and pointing towards the target object through the Risk Assessment Template property.

    This basically behaves like a template if correct placeholders are put on the template.

Reply
  • To cover this use case, I usually store the template in some relationship (eg on SWMS object, I would have a "Risk Assessment Template" property set towards your template document), then call the CreateObject method with 'Create as a copy' parameter as Yes and pointing towards the target object through the Risk Assessment Template property.

    This basically behaves like a template if correct placeholders are put on the template.

Children
No Data