Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Plugins On Create/Update Of Invoicedetail entity

(0) ShareShare
ReportReport
Posted on by 105

Hi All,

I'm working on a requirement, where I need to write a couple of new plugins which need to be triggered on the below:

The question I had was, which message do I need to register these on and for which entity ?

1) Plugin which should run when a new Invoice product line is added to an existing Invoice --> Should I register this on create of Invoicedetail(invoice Product) OR on Update of Invoice entity ? 

2) Plugin which should run when a field on an existing Invoicedetail(Invoice Product) entity like quantity, amount etc is updated  -->  I believe I should register this on update of Invoicedetail entity ?

Can you please advise on the above, as always your help is highly appreciated.

Thanks !!

  • Toly Rogers Profile Picture
    Toly Rogers 105 on at
    RE: Plugins On Create/Update Of Invoicedetail entity

    Thanks Ravi for your response. I will create the plugin on Invoicedetails

  • Toly Rogers Profile Picture
    Toly Rogers 105 on at
    RE: Plugins On Create/Update Of Invoicedetail entity

    Thanks Adrian. That helped me to make the right decision.

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Plugins On Create/Update Of Invoicedetail entity

    Hi Toly,

    In both of your cases, the entity needs to be Invoice Details. This is because plugin triggers on the event caused by the entity so if you want to trigger it when you create a new entity record, then you need to register it on the entity you are creating. Similarly, if you want to trigger a plugin on update of entity record then you need to register the plugin on update of that entity.

    If yu are new to plugin then I would also suggest you to go through this tutorial as well: crmbook.powerobjects.com/.../developing-a-plug-in

    Hope this helps.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 1,019 Super User 2025 Season 1 on at
    RE: Plugins On Create/Update Of Invoicedetail entity

    Hi Toly Rogers,

    I'll try and answer your questions.

    1. Run a Plugin on create and update of the invoicedetail entity. For the update step set the Filtering Attribute to the Invoice lookup field and make sure that this field contains data in your Plugin before continuing execution.
    2. Definitely run this Plugin on update of the invoicedetail entity. Make sure that you set the Filtering Attributes of your Plugin step so that your Plugin only runs on selected fields.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans