Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

Map Fields Agreement -> Invoice Setup to Invoice

Posted on by 51

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?

  • jdaniel1 Profile Picture
    jdaniel1 51 on at
    RE: Map Fields Agreement -> Invoice Setup to Invoice

    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!

  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    RE: Map Fields Agreement -> Invoice Setup to Invoice

    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

  • Verified answer
    Gabriel Dias Junckes Profile Picture
    Gabriel Dias Junckes 2,435 on at
    RE: Map Fields Agreement -> Invoice Setup to Invoice

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans