当前位置:网站首页>Dynamics 365 插件中权限操作
Dynamics 365 插件中权限操作
2022-06-23 03:47:00 【zcy_wxy】
分派
AssignRequest assign = new AssignRequest();
assign.Assignee = userReference;
assign.Target = entityReference;
共享
GrantAccessRequest grant = new GrantAccessRequest();
grant.PrincipalAccess = new PrincipalAccess
{
//读、写、附加等权限共享
AccessMask = AccessRights.ReadAccess | AccessRights.WriteAccess | AccessRights.AppendAccess,
Principal = userEntityReference//共享给某个用户
};
grant.Target = entityReference;//要共享的对象取消共享
RevokeAccessRequest revokeAccessRequest = new RevokeAccessRequest {
Revokee = userEntityReference,
Target = entityReference
};查询共享
var accessRequest = new RetrieveSharedPrincipalsAndAccessRequest
{
Target = entityRef
};
RetrieveSharedPrincipalsAndAccessResponse accessResponse = (RetrieveSharedPrincipalsAndAccessResponse)service.Execute(accessRequest);
List<EntityReference> accessList = null;
if (accessResponse != null && accessResponse.PrincipalAccesses.Length > 0)
{
accessList = new List<EntityReference>();
for (int i = 0; i < accessResponse.PrincipalAccesses.Length; i++)
{
EntityReference accessOwner = accessResponse.PrincipalAccesses[i].Principal;
accessList.Add(accessOwner);
}
}
参考文章:
https://www.cnblogs.com/supersblog/p/5959505.html
边栏推荐
- Redis启动有问题
- Ideal car × Oceanbase: when new forces of car building meet new forces of database
- [tcapulusdb knowledge base] [list table] example code of batch deleting data at specified location in the list
- 【一起上水硕系列】Day Three - preview4
- D overloading nested functions
- 虫子 STM32 中断 (懂的都懂)
- Zhongang Mining: the demand for fluorite in the new energy and new material industry chain has increased greatly
- 虫子 STM32 高级定时器 (哈哈我说实话硬件定时器不能体现实力,实际上想把内核定时器发上来的,一想算了,慢慢来吧)
- Compilation, installation and global configuration section description of haproxy
- redisTemplate和cacheManager操作redis有什么不同
猜你喜欢

Black horse PostgreSQL, why is it black in the end

mysql存储引擎之Myisam和Innodb的区别

深度学习 简介

Basic skills of x64dbg
![[advanced binary tree] AVLTree - balanced binary search tree](/img/a5/aef68dd489ef5545e5b11ee2d3facc.png)
[advanced binary tree] AVLTree - balanced binary search tree

Efficient remote office experience | community essay solicitation

在word里,如何让页码从指定页开始编号

What if the self incrementing IDs of online MySQL are exhausted?

Code refactoring Guide

众昂矿业:新能源新材料产业链对萤石需求大增
随机推荐
元素的常用事件
如何保证应用程序的安全性
Twitter与Shopify合作 将商家产品引入Twitter购物当中
AI 视频云 VS 窄带高清,谁是视频时代的宠儿
Redis启动有问题
IDEA-导入模块
【LeetCode】179. Maximum number
Basic skills of x64dbg
Similar to RZ / SZ, trzsz supporting TMUX has released a new version
Implementation of VGA protocol based on FPGA
移动端城市列表排序js插件vercitylist.js
[binary tree] 993 Cousins in Binary Tree
mysql优化,sql执行非常卡顿,不改变sql结构达到10秒内结束
bubble sort
会话和守护进程
Section 2: spingboot unit test
仿360桌面悬浮球插件
背景彩带动画插件ribbon.js
P1363 幻象迷宫(dfs)
Bug STM32 advanced timer (haha, to tell you the truth, the hardware timer can't reflect its strength. In fact, I want to send the kernel timer. Just think about it. Take your time)