The default configuration of the Customers API is returning the Attributes
array as below for the customerApi.GetList(top: 5, expand: "Attributes", select: "Attributes/Attribute,Attributes/Value");
request
"Attributes": [
{
"Attribute": {
"value": "Company Revenue"
},
"Value": {
"value": "1,000,000 to 5,000,000"
},
"id": "6df69428-7157-438f-8b61-99b2d7d1a3ad",
"rowNumber": 1,
"custom": {}
},
{
"Attribute": {
"value": "Number of Employees"
},
"Value": {
"value": "1-100"
},
"id": "15c3f47f-36eb-481b-92c0-f6b2f738732f",
"rowNumber": 2,
"custom": {}
}
]
Attributes->Attribute->Value is the identifier for the Attribute which is corresponding to the Description of the Attribute record.
Your result is returned for customerApi.GetList(top: 5, expand: "Attributes", select: "Attributes/Value");
request. Please make sure that you have included the Attributes/Attribute in the select part if you are specifying it.
UPDATE
There is a small difference in naming between 18.200 and 20.200.
In 18.200 the Attribute ID is actually named Attribute
In 20.200 the Attribute ID is renamed to Attribute ID
That is why this request is working correctly for 18.200
namespace Acumatica.Default_18_200_001.Model
{
[DataContract]
public class AttributeDetail : Entity_v3
{
[DataMember(Name="Attribute", EmitDefaultValue=false)]
public StringValue Attribute { get; set; }
[DataMember(Name="RefNoteID", EmitDefaultValue=false)]
public GuidValue RefNoteID { get; set; }
[DataMember(Name="Required", EmitDefaultValue=false)]
public BooleanValue Required { get; set; }
[DataMember(Name="Value", EmitDefaultValue=false)]
public StringValue Value { get; set; }
}
}
namespace Acumatica.Default_20_200_001.Model
{
[DataContract]
public class AttributeValue : Entity_v4
{
[DataMember(Name="AttributeID", EmitDefaultValue=false)]
public StringValue AttributeID { get; set; }
[DataMember(Name="AttributeDescription", EmitDefaultValue=false)]
public StringValue AttributeDescription { get; set; }
[DataMember(Name="RefNoteID", EmitDefaultValue=false)]
public GuidValue RefNoteID { get; set; }
[DataMember(Name="Required", EmitDefaultValue=false)]
public BooleanValue Required { get; set; }
[DataMember(Name="Value", EmitDefaultValue=false)]
public StringValue Value { get; set; }
[DataMember(Name="ValueDescription", EmitDefaultValue=false)]
public StringValue ValueDescription { get; set; }
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…