The “Document Name”- property allows to define a name or a name pattern within DcoumentsCorePack templates. Once defined, documents generated automatically have fancy names.
To give an example: If the document name property is defined as “Quote_<<quotenumber>>” the generated document will be named “Quote_QUO-01007-B9F71.pdf“. Thus, all fields from the Dynamics 365 record itself can be used within the document name.
If you are not sure how to get to access to the template settings to set the document subject please have a look at this article first.
Step 1: Access the “Document Name and Subject”-section
❶ Navigate to “Document Name and Subject”.
Step 2: Set your ❷ “Document Name Pattern”
Insert placeholder for Dynamics 365 fields by double-clicking the element in the tree or type in some fixed text enclosed by single quotes.
The basic rules for the syntax of this property are:
- Dynamics 365 fields have to be enclosed by <<and>>
- The fixed text has to be enclosed by single quotes (‘).
- Fields and fixed text have to be combined with a plus (+).
- You can display the name in upper case when using the upper function e. g. Documentname: ‘Inv-‘+<<name>>.upper().
Details about the syntax for this property can be found here: DocumentsCorePack Property Syntax
Step 3: Save your template
Before you can use or test your template you have to save it. Either you save your template locally with the standard ❶ “Save” or “Save as“-funcionality of MS Word or you use the ❷ “Save template“-option of the DocumentsCorePack TemplateDesigner in order to publish the template to Dynamics 365.
Step4: Test your template
As you have made changes to your template you might want to test it quickly. A step by step description of how to test your template can be found here.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to email@example.com