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)

Opportunity owner cannot close the record as won/lost

(0) ShareShare
ReportReport
Posted on by

Hello All,

I want the quotes created from an opportunity to be shared with the Opportunity owner by default.

Otherwise this leads to issues because the Opportunity owner is not able to see some of the quotes which were created from a different Business unit, so that he is not able to see them.

And as you know CRM restricts the closure of opportunities if there are any open/draft quotes associated with it.

In our case the User receives an error called "Sales Force Automation Error". I have figured out its because of quotes still open. But this is a very bad situation as the user might be wondering why he cannot close his own opportunity, atleast CRM should give a friendly message saying "There are still open quotes associated with the Opportunity" I am not sre if this is the case with everyone, may be this type of error is coming from the customizations.

 

6683.Capture.JPG

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    <s:Envelope xmlns:s="schemas.xmlsoap.org/.../&quot;><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">The opportunity can not be closed.</faultstring><detail><OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts&quot; xmlns:i="www.w3.org/.../XMLSchema-instance&quot;><ErrorCode>-2147220202</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic&quot;/><Message>The opportunity can not be closed.</Message><Timestamp>2015-05-03T14:00:30.4620482Z</Timestamp><InnerFault><ErrorCode>-2147220202</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic&quot;/><Message>The opportunity can not be closed.</Message><Timestamp>2015-05-03T14:00:30.4620482Z</Timestamp><InnerFault i:nil="true"/><TraceText i:nil="true"/></InnerFault><TraceText i:nil="true"/></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>

  • Aileen Gusni Profile Picture
    44,524 on at

    Sameera,

    Yes,  You cannot close an Opportunity (as either Won or Lost) if active or draft Quotes are associated with it..

  • Verified answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    You can write a plugin to share your quote with the opportunity created user.

    Check this: msdn.microsoft.com/.../hh547423.aspx

    In case you want to show your custom message, again I don't see this error message under Messages, so I think you need to register a plugin on opportunity and need to catch fault exception and compare if message equal to this, and show your custom error message. Further you can also think of creating a custom entity where you can have system message and your custom message, that can be easily changed and retrieved in plugin.

    Thanks

  • Verified answer
    Rasmus R. Aardal Profile Picture
    on at

    Hello Sameera,

    The cleanest way to solve this is writing a plugin that automatically shares any quotes with the opportunity owner as HIMBAP suggests.

    Unfortunately in this case, the Opportunity:Quote 1:N relationship is governed by the system which means you cannot edit the cascading of shares.

    A temporary way of letting your users know that an open/draft quote is blocking the opportunity from being closed is to write a JavaScript function to fire onClick of the closing buttons on the opportunity form, which queries for open, associated quotes using OData and produces a standard JavaScript alert("This opportunity cannot be closed as there are open quotes associated with it.");

    Furthermore, the Opportunity:Quote relationship is set up to cascade ownership of the quote if the opportunity is reassigned. This means that if the opportunity owner were to assign their opportunity to someone else and then back to themselves, they would also take over ownership of quotes related to the opportunity.

    Not sure if this will help you in any way, but it may be nice to know as part of a temporary work-around where you would set up a workflow that reassigns the opportunity and then assigns it back to the original owner, granting ownership of all quotes.

    Good luck!

    Regards,

    Rasmus

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