locked
Close Opportunity (Won or Lost) using CRM 2015 SDK RRS feed

  • Question

  • I've tried every possible way I can think of to use both WinOpportunityRequest or LoseOpportunityRequest using the Dynamics CRM 2015 SDK (C#). I keep getting an exception with the following message.

    "An unexpected error occurred."

    I also can't find any sample code for the 2015 SDK to do this. Could someone show me a code snippet to use either one of these messages using the 2015 SDK.

    Here's the code for my latest attempt.

    WinOpportunityRequest WinOpportunityReq = new WinOpportunityRequest
    {
      OpportunityClose = new Entity("opportunity", new Guid(OpportunityId)),
      Status = new OptionSetValue(StatusCode)
    };

    WinOpportunityResponse WinOpportunityRes = (WinOpportunityResponse)_OrgServiceProxy.Execute(WinOpportunityReq);


    • Edited by TJN11 Monday, May 25, 2015 5:43 AM
    Monday, May 25, 2015 5:39 AM

Answers

All replies