【发布时间】:2018-06-25 08:04:29
【问题描述】:
当尝试使用 InsertOptionValueRequest 定义 statuscode 自定义值时,我收到以下消息:
创建新状态值时,必须提供什么状态值 该状态与
我目前拥有的是:
var response = orgContext.Execute(new InsertOptionValueRequest
{
AttributeLogicalName = "statuscode",
EntityLogicalName = "op_employeragreement",
Label = new Label("Under review", 1033),
Value = 2
});
我应该如何提供关联的state?这些是类属性(取自 Microsoft.Xrm.Sdk.dll, v7.0.0.0 (CRM 2015):
namespace Microsoft.Xrm.Sdk.Messages
{
[DataContract(Namespace = "http://schemas.microsoft.com/xrm/2011/Contracts")]
public sealed class InsertOptionValueRequest : OrganizationRequest
{
public InsertOptionValueRequest();
public string AttributeLogicalName { get; set; }
public Label Description { get; set; }
public string EntityLogicalName { get; set; }
public Label Label { get; set; }
public string OptionSetName { get; set; }
public string SolutionUniqueName { get; set; }
public int? Value { get; set; }
}
}
如您所见,它不包含State 属性。
【问题讨论】:
标签: c# dynamics-crm metadata dynamics-crm-2015