【问题标题】:Get the context of a team in dynamics crm在动态 crm 中获取团队的上下文
【发布时间】:2016-02-25 00:39:30
【问题描述】:

我在动态 crm 中有一个 temas 列表,我希望在创建 crm 的上下文时只有一个团队的上下文,即该团队无法访问其他团队的记录。

我尝试像这样更改组织代理的 callerID:

        //original context
        OrganizationServiceContext contextORI = new OrganizationServiceContext(organisationProxy);
        //i search th team
        team team= (from k in contextORI.CreateQuery<Utilisateur>()
                            where k.Id == TEAM.Id
                            select k).FirstOrDefault();
        //i change the caller of organisationProxy
        this.organisationProxy.CallerId = team .Id;
        //i create the new context
        OrganizationServiceContext context = new OrganizationServiceContext(organisationProxy);

但团队始终可以访问所有结果

你知道我怎样才能只知道团队的背景吗?

【问题讨论】:

    标签: dynamics-crm-2011 dynamics-crm dynamics-crm-2013


    【解决方案1】:

    这行不通。

    OrganizationServiceProxy.CallerId 期望系统用户的 id。 https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.client.organizationserviceproxy.callerid.aspx

    您可以冒充该团队的成员,并提供用户和团队仅对您正在查询的实体具有用户/团队读取权限的上下文应适当过滤。

    【讨论】:

      猜你喜欢
      • 2019-12-19
      • 1970-01-01
      • 1970-01-01
      • 2019-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-30
      • 1970-01-01
      相关资源
      最近更新 更多