web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Map Fields Agreement -> Invoice Setup to Invoice

(0) ShareShare
ReportReport
Posted on by 55

When the invoice is automatically made from the Invoice Setup for Agreements, how do we control that workflow to map another field. At the very least we need to map the associated Agreement so we can write a workflow that copies over some other information to the Invoice. Little surprised the system doesn't already do this by default. 

But I can't seem to find where this automatic behavior is managed. Is it a workflow or a Relationship or something else?

I have the same question (0)
  • Verified answer
    Gabriel Dias Junckes Profile Picture
    2,428 on at

    Hi Daniel.

    Field Service controls when the invoices are created from this table Agreement Invoice Date (msdyn_agreementinvoicedate). The msdyn_invoicestatus will update to Processed (690970001), and the field msdyn_Invoice (lookup) will be populated with the new invoice.

    You can trigger your custom logic on the update of the field msdyn_Invoice to update the new invoice.

    I have done it many times with Flow.

    Updating the Invoice Status Reason (statuscode) to Billed (4). Field Service will create records on the actual table.

  • Suggested answer
    Leah Ju Profile Picture
    Microsoft Employee on at

    Hi jdaniel1,

    When you set Invoice Setup, you need set up Agreement invoice Products, it can be related to current agreement.

    https://learn.microsoft.com/en-us/dynamics365/field-service/set-up-customer-agreements#step-1-create-an-agreement-or-select-an-existing-one  

    pastedimage1671095559104v3.png

    However, Out of the box the Invoice entity doesn’t have a relationship to Agreement, and Agreement has 1:N relationship with Invoice Product.

    So you need create one lookup to agreement firstly, then copy agreement value from invoice product to the new lookup on the invoice through workflow. 

    Refer to the following link for detailed steps:

    https://daytodaydynamics365.com/dynamics-365-field-service-adding-a-lookup-to-a-related-agreement-and-work-order-on-an-invoice/ 

    =====

    Or you can refer to Gabriel idea, use flow to update Invoice with value from the 'Agreement' lookup field of 'Agreement Invoice Date' entity when 'Invoice' lookup field updated.

    You also need create one lookup to agreement firstly--build 1:N relationship between Agreement and Invoice entities.

    Agreement and Agreement Invoice Date is 1:N 

    Invoice and Agreement Invoice Date is 1:N 

    pastedimage1671097577981v4.png

  • jdaniel1 Profile Picture
    55 on at

    Yep, took some digging around, but i finally found that hidden entity. I'll just do a workflow based on when the invoice gets filled out. Thanks for the help!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 75 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans