我正在尝试从设备中查询业务单位 ID,但出现错误
QueryExpression qe = new QueryExpression();
qe.EntityName = "equipment";
qe.ColumnSet = new ColumnSet();
qe.ColumnSet.AddColumns("equipmentid", "name", "businessunitid");
qe.Criteria.AddCondition("name", ConditionOperator.Equal,EquipmentDropdown.Text);
EntityCollection resultequipments = _orgService.RetrieveMultiple(qe);
if(resultequipments.Entities.Count > 0)
{
Equipmentid = (Guid)resultequipments.Entities[0]["equipmentid"];
Buid = (Guid)resultequipments.Entities[0]["businessunitid"]; // error at this line
}
有人请帮助提前谢谢