• Release History
  • Documentation
  • Back to www.mscrm-addons.com
  • Release History
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)/Create an inspection report for a Work Order

Create an inspection report for a Work Order

166 views 0 Updated on November 27, 2022

This article covers how to insert an inspection response for a Work Order into a DocumentsCorePack (DCP) template.

If you have not heard about inspections before, we recommend looking at this article about the Field Service Inspection responses feature before continuing. If you want to build your template based on the table “Work Order Service Task”, have a look at this post. If you have not worked with DCP before, we recommend viewing the following: Getting Started.

Sample Template while editing
Figure 1: Sample template while editing

The following step is necessary for obtaining required data, as the questions and answers do not follow the standard table-row-model (entity-record-model) of MS Dataverse. The actual data is stored in fields as blocks of JSON data and these two elements are only loosely bound.

Resolve the required relationships

First you must resolve the relationship between the work order, the inspection and the inspection result. If you have not worked with relationships before, have a look at this article before continuing.

Your template must be based on the table (entity) “Work Order”, and you have to create a nested relationship with specific fields.

The first level is from “Work Order” to “Work Order Service Task” (1:n). There are no mandatory fields on this level. However, you can insert additional fields if needed for your document.

From there you have to add a link element from “Inspection Response” to “Work Order Service Task” (n:1). The required fields on this level are “InspectionResponse” [sic] and “ResponseJsonContect” [sic].

The last level is “Inspection Template Version” to “Inspection Response” (n:1) with the field “JsonContent” [sic].

Required relationships and fields
Figure 2: Required relationships and fields

Any additional filters or fields that you require can be added on any of the levels. After adding the relationships, the minimum tree of the available fields will appear as in the picture below.

Relationship displayed in the designer
Figure 3: Relationship displayed in the designer

The “ResponseJsonContent” [sic] field contains the answers as plain JSON data, and the “JsonContent” [sic] field holds the JSON data of the inspection template. The “InspectionResponse” [sic] itself holds an important ID. These fields are mandatory as part of this relationship and they are all used internally.

Insert field as Inspection

To insert the inspection response, you must select the field “ResponseJsonContent” [sic] ❶. Then expand the Insert Fields drop down ❷ and select “Insert ‘ResponseJsonContent’ as Inspection” ❸.

Step to insert a insepection
Figure 4: Step to insert as inspection

If you see a dialog like the one below, you most likely selected a wrong field that is not suitable for an inspection field. As the inspection field is a special case that also requires specific fields from the system, we automatically try to fill this dialog for you. If we find all the correct fields, we fill it automatically and you will not see this dialog.

Figure 5: Inspection Properties Dialog

For this example, we have one related inspection response, so we select “Insert the field from the first related record without a table”. But, of course, this would also work as part of a table.

Table insertion question
Figure 6: Table insertion question

Afterwards several content controls will appear in your document. The wrapping content control represents the whole inspection. The table row represents a question with an answer. The <<index>> field is the number of the question and the <<title>> field contains the question itself. The <<value>> field contains the answers.

Sample of the inserted fields related to inspection
Figure 7: Sample of the inserted fields related to inspection

For the normal text formatting, you can simply format the fields with the standard word formatting options, the same way as for DCP Fields. For more details about the additional formatting options, have a look at this article about Inspection response formatting and advanced settings.

Next you can test your template. Each question will have its own row with corresponding data.

Template (left) and merged document
Figure 8: Template (left) and merged document

That’s all on how to work with inspection responses for Work Orders. We appreciate your feedback! Please share your thoughts by sending us an email to support@mscrm-addons.com!

Downloads

WorkOrder-BaseTemplateDownload

Related Articles

Working with Field Service Inspection responses

Getting Started

External Links

Add inspections to work orders in Dynamics 365 Field Service

Tags:inspectionwork orderrelationship

Was this helpful?

Yes  No
Related Articles
  • Working with Product Properties in DocumentsCorePack
  • How to work with the Relationship Manager
  • Using virtual tables in DocumentsCorePack
  • DocumentsCorePack Template Designer Settings
  • How to solve: Failed to connect to an IPC Port
  • How to solve: Failed to connect to an IPC Port
Latest Articles
  • Working with Product Properties in DocumentsCorePack
  • How to work with the Relationship Manager
  • Using virtual tables in DocumentsCorePack
  • DocumentsCorePack Template Designer Settings
  • How to solve: Failed to connect to an IPC Port
Popular Articles
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
  • DocumentsCorePack Template Designer – Getting Started
  • mscrm-addons.com Application Access for Dynamics 365 (App Access) – DocumentsCorePack
  • DocumentsCorePack Online Service Configuration
  • Step-by-Step: How to configure a One-Click-Action
Top Rated Articles
  • IMPORTANT information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • Step-by-Step: How to configure a One-Click-Action
  • Online Services: Required Application Permissions
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
Categories
  • *News and General Infos* 51
  • Webinars 35
  • Template Designer(DCP 180
  • DocumentsCorePack(DCP 191
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 62
  • PowerSearch (PS 48
  • ActivityTools (AT 59
  • SmartBar (SB 53
  • GroupCalendar (GC 46
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
  • © 2022 www.mscrm-addons.com. All Rights Reserved.