Hi all,
I have an opportunity that's already in "Won" status.. I want to change its status reason to my customs one with value "200013" which I've added to the list of statuses in Win.
My code follows, but this returns an error "0x80040515 The opportunity is already closed. Platform".
//Opportunity is already in "Win" state
//Modify this opportunity status to "Cancellation in Progress", leaving it as "Win"
opportunityclose oppclose = new opportunityclose();
oppclose.opportunityid =
new Lookup();
oppclose.opportunityid.type =
EntityName.opportunity.ToString();
oppclose.opportunityid.Value = id;
WinOpportunityRequest woReq = new WinOpportunityRequest();
woReq.OpportunityClose = oppclose;
woReq.Status = 200013;
WinOpportunityResponse woResp = oService.Execute(woReq) as WinOpportunityResponse;
I also tried openning the existing opportunityclose record with the given opportunity ID, but I get the same error...
Can anyone help?
thanks