zoukankan      html  css  js  c++  java
  • Dynamics 365中的常用Associate和Disassociate消息汇总

    摘要: 微软动态CRM专家罗勇 ,回复301或者20190123可方便获取本文,同时可以在第一间得到我发布的最新博文信息,follow me!我的网站是 www.luoyong.me 。

    因为编程时候可能常用到,我这里做个简单汇总,以后若有碰到常用的会继续增加。

    1.  用户添加角色

    orgSvc.Associate(
    "systemuser", userId, new Relationship("systemuserroles_association"), new EntityReferenceCollection(){ new EntityReference("role",roleId) });

    2. 用户移除角色

    orgSvc.Disassociate(
      "systemuser",
        userId,
        new Relationship("systemuserroles_association"),
        new EntityReferenceCollection() { new EntityReference("role", roleId)
    });

    3. 负责人类型团队添加角色

    orgSvc.Associate(
       "team",
        teamId,
        new Relationship("teamroles_association"),
         new EntityReferenceCollection() { new EntityReference("role", roleId)
    });

    4.负责人类型团队移除角色

    orgSvc.Disassociate(
       "team",
        teamId,
        new Relationship("teamroles_association"),
         new EntityReferenceCollection() { new EntityReference("role", roleId)
    });

    5.私有队列加入用户

    orgSvc.Associate(
       "queue",
        queueId,
        new Relationship("queuemembership_association"),
        new EntityReferenceCollection() { new EntityReference("systemuser",userid)
    });

    6. 私有队列移除用户

    orgSvc.Disassociate(
       "queue",
        queueId,
        new Relationship("queuemembership_association"),
        new EntityReferenceCollection() { new EntityReference("systemuser",userid)
    });
  • 相关阅读:
    06.SpringMVC之参数绑定
    05.SpringMVC之请求映射
    04.SpringMVC之用
    03.SpringMVC之器
    02.SpringMVC之初体验
    01.SpringMVC之概述
    Spring 中的Null-Safety
    Spring中Resource(资源)的获取
    Spring的事件机制详解
    Spring详解(二)------注解配置IOC
  • 原文地址:https://www.cnblogs.com/luoyong0201/p/Dynamics_365_Associate_Disassociate.html
Copyright © 2011-2022 走看看