【发布时间】:2018-01-24 12:56:41
【问题描述】:
我想在 CRM 中创建 Won Opportunity,但出现以下错误。
错误:
附加信息:3 不是状态码的有效状态码 OpportunityState.打开带有 ID 的机会 8e99128b-3ef0-e711-8145-e0071b6641f1。
代码:
public void CreateOpportunity()
{
Entity opportunity = new Entity("opportunity");
opportunity["name"] = "ABC";
opportunity["statecode"] = new OptionSetValue(1);
opportunity["statuscode"] = new OptionSetValue(3);
crmService.Create(opportunity);
}
【问题讨论】:
标签: c# dynamics-crm microsoft-dynamics