Dynamics 365 Field Service: Adding a lookup to a related Agreement and Work Order on an Invoice

Tested on:
Dynamics 365 version 9.0.2, FS solution version 8.x, Unified Client Interface

When looking at a Field Service Invoice, one quickly notices it is missing a lookup to a related Agreement and Work Order. References to those entities can be found but they are a couple of mouse clicks away. Navigating to an Invoice Line reveals references to a related Agreement and Work Order when looking behind the Field Service tab. But how can we get that information on the Field Service Invoice form so that it is visible when we open an Invoice record?

Creating lookups to Agreement and Work Order

Out of the box the Invoice entity doesn’t have a relationship to Agreement or Work Order in Dynamics 365 Field Service. The first task is to create a relationship between the entities and then place the new lookup fields on the Field Service Invoice form. Personally I prefer to have the lookups right below the lookups to Opportunity and Contract.


Creating a workflow to populate the lookups

As the information about the related Agreement and Work Order is already on an Invoice Line, the next task is to create a workflow that populates the new lookup fields with values from an Invoice Line. To achieve this I’ve created a background workflow on the Invoice Line entity.

When an Invoice is created from an Agreement Invoice Setup, the Related Agreement lookup is populated. When an Invoice is created from a Work Order, the Related Work Order lookup is populated.

I hope this brief article simplifies invoicing for your organization and helps you connect Invoices created in Field Service with the related Agreements and Work Orders.

Disclaimer:
All my blog posts reflect my personal opinions and findings unless otherwise stated.

Leave a Reply

Your email address will not be published. Required fields are marked *