Skip to content

Build a project template

A project template is built from the bottom up: folders first, then the documents that go in them, then the template that collects the lot. Building it in that order means every reference points at something that already exists.

This guide builds a small onboarding template — three folders and one starting document — which is the right size for the first one on a new deployment.

PDS installed and configured, with the project, path and document template sections filled in. The application status in M-Files Admin should report no configuration errors.

  1. Create the folders as path objects.

    Create one path object per folder. In each, put the folder’s own name — not its full path — in the partial path title property, and its parent folder in the directory structure property. A top-level folder has no parent.

    For the onboarding example: Contracts, Correspondence and Deliverables, each with no parent.

  2. Create the document template.

    Create an ordinary M-Files document with the file to be copied attached — the blank engagement letter, the standard agenda. This is a real document in the vault, and it is what ends up in SharePoint.

  3. Create a document object template for it.

    This is the object that joins a document to a folder. On it, set:

    • the document template property to the document created in the previous step;
    • the full path property to the path object for the folder the copy belongs in;
    • the directory structure property.

    All three are required. A missing one fails baseline generation with a message naming this object.

  4. Create the project object template.

    Set its directory structure property to the folder structure the project should get, and its document object templates property to the document object template created above. Add more document object templates here as the template grows.

  5. Point a project at the template.

    Create a project object and set its template property to the project object template.

  6. Generate the baseline.

    Move the project into the generate baseline state. PDS validates the template, then creates one SharePoint artefact per document object template and moves the project to the baseline generated state.

    If the transition fails, the message names the object that is incomplete. Fix that object and try the transition again — nothing partial is left behind.

  7. Activate the project.

    Set the project’s SharePoint URL property, then move the project into the activate state. PDS hands the folders and artefacts to CtrlSync, which creates them in SharePoint.

  • The three folders exist in the SharePoint site, nested as the path objects describe.
  • The engagement letter is in Contracts, with the name the title placeholder produced and the content of the document template.
  • The artefact object in the vault records the version of the template it was made from.

By default an artefact is titled after its document object template. The TitlePlaceholder setting changes that: it accepts property placeholders such as {Name} or {Title}, expanded when the document is created. A placeholder naming a property the object does not have produces an empty value rather than an error, so check the result on the first upload.

Adding a document object template to a project template affects projects generated from then on. Projects already generated keep the artefacts they were given — each artefact records the version of the template it came from, and PDS does not go back and revise them.

To give an existing project a document it did not start with, add it to the project directly.