mscrm-addons.com logomscrm-addons.com logo
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
home/Knowledge Base/Template Designer(DCP)/Step-by-Step: How to create a work order template

Step-by-Step: How to create a work order template

902 views 0

This article outlines how to create a simple work order template. 

In this step-by-step description, we will create a work order template, consisting of general information about the work order, and a few related tables.  This template will make use of the following features: 

  • Adding fields from Dynamics 365 
  • Creating relationships 
  • Grouping 

This guide is based on a sample template. To view the finished sample template, please see the attached document at the bottom of this article. 

For a video version of this guide, please see the video below: 

Step 1: Setting the base entity 

When creating a template, it is always important to set your base entity first.  This is because the fields displayed in the Template Designer will be determined by this base entity, and once a field has been inserted into a template, the base entity can no longer be changed.  In this case, our base entity is Work Order, so we will set the Type accordingly. 

setting the type
Figure 1: Setting the type

Step 2: Adding our text and general structure 

We will begin by adding our text and general structure to our template.  For this example, this is what our template looks like. 

text and structure
Figure 2: Adding our text and structure

Step 3: Adding our standard fields 

To create our work order template, we need to include some fields that cover the basic information about our work order.  These standard fields will come either from the Work Order entity itself, or from its lookup fields 

standard fields
Figure 3: Adding the standard fields

Step 4: Creating our tables 

Under our General section, we want to create three tables for this work order.  These tables will be based on the Work Order Service Task, Work Order Service, and Work Order Product entities.  To create these tables, we will need to open the Relationship Designer through the Add Relationship/Entity button in the Template Designer. 

For our first table, we will establish a relationship with the Work Order Service Task entity.   

work order service task
Figure 4: Creating the Work Order Service Task table

Here, we will need to select the % Complete, Estimated Duration, and Name fields.  Click OK once all fields have been selected.  The table should appear like the following in the Template Designer. 

field list
Figure 5: The field list

For our second table, we will establish a relationship with the Work Order Product entity.  Similar to above, we will select the relationship in the Relationship Designer.  Then, we will select the Estimate Quantity, Line Status, and Name fields. 

work order product table
Figure 6: Creating the Work Order Product table

Then, we will need to add a Link Element, which can be added at the bottom of the window. 

adding a link element
Figure 7: Adding a link element

In this window, we will create a new N:1 relationship with the Product entity.  We will need the Subject field from this entity.  This field can be located in the field list after selecting the “include lookup fields” checkbox.  Once the Subject field has been selected, Click OK and accept all changes. 

adding product
Figure 8: Adding Product

This table should now appear like the following in the Template Designer. 

work order product field list
Figure 9: The field list for our Work Order Product table

For our last table, we need to establish a relationship with the Work Order Service entity. 

work order service table
Figure 10: Creating the Work Order Service table

We will select the Estimate Duration, Line Status, and Name fields.  Like the Work Order Product table, we will also need to add a Link Element.  We’ll establish a relationship to the Product entity just like before and add the Subject field. 

Once all changes have been saved, this table should look like the following in the Relationship Designer. 

work order service table
Figure 11: The field list for our Work Order Service table

With the fields set up, we are now ready to create the tables themselves. 

Each table will have the same general structure.  We will start by creating a table based on the Work Order Service Task relationship by double-clicking on the Name field in the fields list.  We’ll set up the table with the following settings: 

setting up the table
Figure 12: Setting up the table with the above settings

Once the table is created, we can add our % Complete and Estimated Duration fields to it, alongside our already-added Name field.  We’ll also add some appropriate column names. 

creating a table
Figure 13: Creating one of our tables

We will repeat this process for our other tables.  We’ll also add some single-cell tables to keep things looking organized. 

Our tables should now look like this. 

three tables done
Figure 14: Our three tables finished

There’s one more thing we need to add: grouping. 

Step 5: Grouping 

When applying grouping to a table, you can organize your dynamically generated table into categories.  This can be handy in situations where, for example, you would want to categorize products as “electronics” or “services.” 

To apply grouping to a table, you first need to add the field you want to group your table by into the table.  In our case, we’ll add the Subject field from our Work Order Product relationship into the table. 

subject field
Figure 15: Adding the ‘Subject’ field to our table as our grouping field

Once the field has been added, we will click on it and then navigate to the Edit Table group in the www.mscrm-addons.com tab.  Then, we’ll click on the Grouping dropdown and select Mark Groupingfield. 

grouping dropdown
Figure 16: Selecting the ‘Grouping’ dropdown
mark groupfield
Figure 17: Selecting ‘Mark Groupingfield’

The result should look like this: 

table with grouping
Figure 18: One of our tables, now with grouping added.

We can remove the field itself from our main table row, as it is not needed in our table.  Additionally, we can delete the grouping footer by selecting the footer, navigating back to the Grouping dropdown and selecting Remove Groupingfooter. 

Our table should now look like this: 

field and footer removed
Figure 19: The same table, now with the ‘Subject’ field and grouping footer removed.

This process can be repeated for our Work Order Service task.  We will not do this for our Work Order Service Task table. 

The tables should end up looking like this: 

tables with grouping applied
Figure 20: Our tables with grouping added as needed.

Step 6: Generating a document 

At this point, your template should something like this: 

finished template
Figure 21: Our finished template

When we run this template against some data, we receive the following result.  Note the grouping on the last two tables. 

generated document with grouping
Figure 22: Our generated document. Grouping has been applied to the last two tables.

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com. 

Attached Files
#
File Type
File Size
Download
1 .docx 422.50 KB Work Order sample

Was this helpful?

Yes  No
Related Articles
  • Debugging the Template Design Office Add-In 
  • Introducing the DocumentsCorePack Template Designer Office Add-In
  • Ensuring correct time zone display for DateTime fields
  • How to compare a date-fields with the current date 
  • Create a template for XML or plain text
  • E-Invoicing with DocumentsCorePack
Latest Articles
  • Recap: Nordic Summit 2025
  • The new Template Designer Office Add-In
  • Debugging the Template Design Office Add-In 
  • Updating Legacy SharePoint Connections 
  • What Happens After You Deploy AttachmentExtractor: Storage & Cost Savings in Dynamics 365
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How to find your environment’s unique name in Microsoft Dynamics 365
  • How licenses are counted
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How to insert Condition Fields in DocumentsCorePack Templates designer
  • How licenses are counted
Categories
  • *News and General Infos* 65
  • Webinars 46
  • Template Designer(DCP 197
  • DocumentsCorePack(DCP 260
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 75
  • PowerSearch (PS 50
  • ActivityTools (AT 61
  • SmartBar (SB 54
  • GroupCalendar (GC 47
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2025 www.mscrm-addons.com. All Rights Reserved.