• No Responses

    How to Trigger Plugin when Opportunity is won?

    Introduction

    Recently, we had a requirement to update a field on opportunity record whenever an opportunity was closed as won.

    My first thought was that it was pretty straightforward and registered the plugin using this step:

    • Message – Update
    • Primary Entity – opportunity

    But it did not fire the plugin when opportunity was closed as won, and I was thinking why?

    Solution

    After a bit of research I found that I instead needed to use the following:

    • Message – Win
    • Primary Entity – opportunity

    But this does not return opportunity as “Target” as you might think, it actually returns “Status” and “OpportunityClose” .

    OpportunityClose contains the information listed on the form displayed when you try to Win/Lose an Opportunity, CRM stores this as a separate entity.

    Jan 2022 Loki

    As you can see we can get opportunintyid from the entity.

    We can use it retrieve the opportunity record and perform desired operation on it.

  • Subscribe
    Notify of
    guest
    0 Comments
    Inline Feedbacks
    View all comments

WANT QUICK D365 IMPLEMENTATION?

Let started with our D365 Quickstart package and get onboard within 7 days!

I'M INTERESTED!
LATEST POSTS
© Copyright 2024 Nebulaa IT Solutions LLP. All Rights Reserved.
Download
Brochure