Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Stopping an opportunity from closing if there are open activities

Posted on by 270

Hi,

Is there a simple way to stop an opportunity from closing if there are open activities against it?

  • Verified answer
    LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: Stopping an opportunity from closing if there are open activities

    Hi partner,

    Unfortunately there is no OOB functions to do this.

    You need to create a plugin and trigger it when you close the opportunity. Since opportunity could be closed with win or lose, so you need to register the plugin in both of them.

    pastedimage1575276446949v2.png

    pastedimage1575276432565v1.png

    Then you should add some judge code in your plugin to check if there is any open activities against to this opportunity record and if there is, you could throw a expection error to stop the close action and shwo the error message on Dynamics 365.

    Hope it helps.

    Best Regards,

    Leo

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Stopping an opportunity from closing if there are open activities

    Hello,

    I'm afraid you will have to develop some kind of code to prevent it.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans