Wednesday 13 February 2013

Set Opportunity status to Won in crm 2011


WinOpportunityRequest winRequest = new WinOpportunityRequest
                    {
                        OpportunityClose = new OpportunityClose
                        {
                            OpportunityId = new EntityReference
                            {
                                LogicalName = "opportunity",
                                Id = order.OpportunityId.Id
                            },
                        },
                        Status = new OptionSetValue(3)
                    };
                    service.Execute(winRequest);

No comments:

Post a Comment