Recently we had a business requirement where customer wants to map Order Line fields to Invoice Line while creating an Invoice from Order. Until Dynamics 365 8.2 version, there was no direct relationship between Order Line and Invoice Line. But, in a recent update we found that there is 1: N relationship between Order Line and Invoice Line.
Please see the below screenshot for the relationship between Order Line and Invoice Line:
Let’s take an example:
Suppose, we need to map a custom field while creating Invoice Line from Order Line.
1. We created a custom field as Invoice Type (Option set) with options Standard Invoice, Commercial Invoice and Progress Invoice on both the entities.
2. Now, in the mapping section of the relationship we have mapped the Invoice Type field as shown in below screenshot:
3. Now let’s create order with order line and select account in customer field in Order Line.
4. Create invoice by clicking on Create Invoice
5. Now as shown in below screenshot we can see mapping between Order line and Invoice Line.
You can also find there is a relationship between Quote Line and Order Line does exist in dynamics 365.
With the Microsoft Dynamics 365 recent update, we can make use of direct relationship between Order line and Invoice Line.