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 :
Microsoft Dynamics CRM (Archived)

Delete all draft Quotes before OpportunityClose from Plugin

(0) ShareShare
ReportReport
Posted on by 3,497

Hi All,

Requirement: Delete all draft quotes when an Opportunity is closed as Won / Lost.

The CRM platform OOB does not allow the user to close Opportunities that have draft/active quotes.

Solution:

I decided that I could use a plugin on the pre-operation of Update / SetState / SetStateDynamicEntity step to intercept the Opportunity Close and delete all the draft quotes before the system closed the Opportunity.

However, my plugin is being executed only AFTERWARDS. As a result, the user still sees the error message from DynamicsCRM about the draft/active quotes.

Maybe I am registering my plugin on the wrong plugin step. I even tried pre-create of OpportunityClose, but no use.
I am using D-CRM Online, version 9.0

I would love to hear some thoughts from the fellow developer!

Cheers & Thanks in advance,

Shidin

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Clem Profile Picture
    2,541 on at

    Hello,

    What about using the LoseRequest  and WinRequest (msdn.microsoft.com/.../gg327908.aspx) in pre-operation ?

    So you query all quotes before the request is actually finished and then you should be good to finish the process.

    Clément

  • Shidin Haridas Profile Picture
    3,497 on at

    Clement,

    That is brilliant! Thank you.

    Cheers!

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans