Entity opptyCloseObj = new Entity("opportunityclose");
opptyCloseObj.Attributes.Add("opportunityid", new EntityReference("opportunity", OpptyID)); opptyCloseObj.Attributes.Add("actualend", DateTime.Now);
opptyCloseObj.Attributes.Add("actualrevenue", ActualopptyAmount);
var lostOpportunity = new LoseOpportunityRequest
{
OpportunityClose = opptyCloseObj,
Status = new OptionSetValue(MIGRATED_STATUS_CODE) // Expired
};
ServiceObj.Execute(lostOpportunity);
No comments:
Post a Comment