Wednesday, May 20, 2015

Close Opportunity as Win


 WinOpportunityRequest winReq = new WinOpportunityRequest();
Entity OpportunityClose = new Entity("opportunityclose");
OpportunityClose.Attributes.Add("opportunityid", eOpportunity);
OpportunityClose.Attributes.Add("actualend", DateTime.Now);
OpportunityClose.Attributes.Add("actualrevenue", 0);

winReq.Status = new OptionSetValue(3);
winReq.OpportunityClose = OpportunityClose;
service.Execute(winReq);

Enjoy,
Rami Heleg

No comments:

Post a Comment