代码之家  ›  专栏  ›  技术社区  ›  Headhunter Xamd

获取回答应隐藏或显示的调查问题

  •  0
  • Headhunter Xamd  · 技术社区  · 8 年前

    我试图(通过代码)找到路由响应的响应与它应该显示或隐藏的问题之间的关系。 我在响应的属性中找不到该问题的参考。是否有我需要的数据来建立链接?

    这是我之前问题的后续:

    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对象。

    1 回复  |  直到 8 年前
        1
  •  1
  •   Arun Vinoth PrecogTechnologies    8 年前

    您要查找的是以下响应操作表单中的问题查找( msdyn_responseaction ):

    enter image description here

    使用QueryExpression列集在检索调用中查询此属性。

    编辑:

    聊天会话结束后,调查响应操作中似乎存在一些设置问题。这个 Routing 自身不工作。