我试图(通过代码)找到路由响应的响应与它应该显示或隐藏的问题之间的关系。
我在响应的属性中找不到该问题的参考。是否有我需要的数据来建立链接?
这是我之前问题的后续:
How to get a relation between the survey entity and the response routing in Dynamics CRM VOC?
编辑:
private static DataCollection<Entity> GetEntities(Guid id, string entityname, string comparisonAttribute, Guid surveyGuid)
{
QueryExpression conditionQuery = new QueryExpression
{
EntityName = entityname,
ColumnSet = new ColumnSet(true),
Criteria = new FilterExpression
{
Conditions =
{
new ConditionExpression
{
AttributeName = comparisonAttribute,
Operator = ConditionOperator.Equal,
Values = { id }
}
}
}
};
return connection.service.RetrieveMultiple(conditionQuery).Entities;
}
我通过以下方式调用此函数:
GetEntities(entity.Id, "msdyn_responseaction", "msdyn_responseroutingid", surveyId);
实体基于问题的responserouting对象。