crm使用soap取消用户訪问记录权限
//取消訪问权限
function demo() {
//操作记录的id
var targetId = "A8A46444-BA10-E411-8A04-00155D002F02";
//操作记录的实体名称
var targetType = "new_config";
//被分配的用户或者团队的id
var assignId = "48025176-2B0E-E411-BA68-00155D002F02";
//systemuser或者team
var assignType = "systemuser";
RevokeAccess(targetId, targetType, assignId, assignType);
}
function RevokeAccess(targetId, targetType, assignId, assignType) {
var request = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">";
request += "<s:Body>";
request += "<Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\"";
request += " xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">";
request += "<request i:type=\"b:RevokeAccessRequest\"";
request += " xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\"";
request += " xmlns:b=\"http://schemas.microsoft.com/crm/2011/Contracts\">";
request += "<a:Parameters xmlns:c=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">";
request += "<a:KeyValuePairOfstringanyType>";
request += "<c:key>Target</c:key>";
request += "<c:value i:type=\"a:EntityReference\">";
request += "<a:Id>" + targetId + "</a:Id>";
request += "<a:LogicalName>" + targetType + "</a:LogicalName>";
request += "<a:Name i:nil=\"true\" />";
request += "</c:value>";
request += "</a:KeyValuePairOfstringanyType>";
request += "<a:KeyValuePairOfstringanyType>";
request += "<c:key>Revokee</c:key>";
request += "<c:value i:type=\"a:EntityReference\">";
request += "<a:Id>" + assignId + "</a:Id>";
request += "<a:LogicalName>" + assignType + "</a:LogicalName>";
request += "<a:Name i:nil=\"true\" />";
request += "</c:value>";
request += "</a:KeyValuePairOfstringanyType>";
request += "</a:Parameters>";
request += "<a:RequestId i:nil=\"true\" />";
request += "<a:RequestName>RevokeAccess</a:RequestName>";
request += "</request>";
request += "</Execute>";
request += "</s:Body>";
request += "</s:Envelope>";
execSoap(request);
}
//获取服务地址
function getWebUrl() {
var serverUrl = Xrm.Page.context.getServerUrl();
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
}
return serverUrl + "/XRMServices/2011/Organization.svc/web";
}
//运行请求
function execSoap(request) {
var ajaxRequest = new XMLHttpRequest();
ajaxRequest.open("POST", getWebUrl(), true)
ajaxRequest.setRequestHeader("Accept", "application/xml, text/xml, */*");
ajaxRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
ajaxRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
ajaxRequest.send(request);
}
crm使用soap取消用户訪问记录权限的更多相关文章
- php 获取/设置用户訪问页面语言类
User Language Class 获取/设置用户訪问的页面语言,假设用户没有设置訪问语言.则读取Accept-Language. 依据用户选择的语言显示相应的页面(英文.中文简体,繁体中文) U ...
- JAVA基础之訪问控制权限(封装)
包:库单元 1.当编写一个Java源码文件时.此文件通常被称为编译单元(有时也被称为转译单元). 2.每一个编译单元都必须有一个后缀名.java,而在编译单元内则能够有一个public类,该类名称必须 ...
- nginx access.log 忽略favicon.ico訪问记录的方法
favicon.ico 文件是浏览器收藏网址时显示的图标,当第一次訪问页面时.浏览器会自己主动发起请求获取页面的favicon.ico文件.当/favicon.ico文件不存在时,服务器会记录404日 ...
- oracle跨数据库跨用户訪问注意事项
java代码中不同意出现oracle的username.数据链路名. 跨用户.跨数据库的訪问必须在oracle中建同义词或视图来实现.在java代码中仅仅需当做当前用户下的对象处理.
- C++ 訪问控制权限图解
基类訪问权限 类继承方式 子类訪问权限 public public protected public protected private No Access p ...
- crm使用soap启用和停用记录
function demo() { //操作记录的id var targetId = "a8a46444-ba10-e411-8a04-00155d002f02"; ...
- [加入用户]解决useradd 用户后没有加入用户Home文件夹的情况,Linux改变文件或文件夹的訪问权限命令,linux改动用户password,usermod的ysuum安装包。飞
usermod的yum安装包: shadow-utils 将nobody用户加入到nogroup 组: usermod -g nogroup nobody cat /etc/passwd|grep n ...
- Windows server2008 搭建ASP接口訪问连接oracle数据库全过程记录
真的是太不easy了,曾经的时候在window server 2003上面搭建了一套asp+oracle的接口系统.就费了好大的劲儿,事实上那会迷迷瞪瞪的也不知道怎么的就弄好了,也懒得管了.OK,从昨 ...
- MYSQL加入远程用户或同意远程訪问三种方法
加入远程用户admin密码为password GRANT ALL PRIVILEGES ON *.* TO admin@localhost IDENTIFIED BY \'password\' WIT ...
随机推荐
- 联合权值(NOIP2014)奇特的模拟。。
原题传送门 这道题瞄了一眼还以为是SPFA最短路. 后面发现距离为2.. 好像可以枚举中间点来着? 时间效率O(n*(2n-2))≍O(n^2) BOOM!(PS:9018上过了,说明数据太水了..) ...
- SPRING CLOUD服务网关之ZUUL
服务网关是微服务架构中一个不可或缺的部分.通过服务网关统一向外系统提供REST API的过程中,除了具备服务路由.均衡负载功能之外,它还具备了权限控制等功能.Spring Cloud Netflix中 ...
- Android从相册选取视频
1. /** * 从相册中选择视频 */ private void choiceVideo() { Intent i = new Intent(Intent.ACTION_PICK, android. ...
- Ubuntu14.04配置VIM与GVIM 高亮、跳转与变量函数列表
一.环境:刚安装好的Ubuntu14.04,本文只能保证 在Ubuntu下能达到效果. 二.安装GVim. sudo apt-get update sudo apt-get install vim-g ...
- Python的网络编程[3] -> BOOTP 协议[0] -> BOOTP 的基本理论
BOOTP协议 / BOOTP Protocol 目录 基本理论 BOOTP 与 DHCP 通信流程 数据报文格式 报文加解码实现 1. 基本理论 / Basic Theory BOOTP(Boots ...
- shell 文件夹总大小 du -sh 文件夹
du -sh 文件夹 du [-abcDhHklmsSx] [-L <符号连接>][-X <文件>][--block-size][--exclude=<目录或文件> ...
- App Class Loader
Java本身是一种设计的非常简单,非常精巧的语言,所以Java背后的原理也很简单,归结起来就是两点: 1.JVM的内存管理 理解了这一点,所有和对象相关的问题统统都能解决 2.JVM Class Lo ...
- [BZOJ 1266] 上学路线Route
Link: BZOJ 1266 传送门 Solution: 好不容易自己写出来一道水题,练链式前向星的模板调了一小时o(╯□╰)o 思路非常好想,既然要想让最短路不成立,使最短路部分不连通即可 又要求 ...
- Mobius反演与积性函数前缀和演学习笔记 BZOJ 4176 Lucas的数论 SDOI 2015 约数个数和
下文中所有讨论都在数论函数范围内开展. 数论函数指的是定义域为正整数域, 且值域为复数域的函数. 数论意义下的和式处理技巧 因子 \[ \sum_{d | n} a_d = \sum_{d | n} ...
- 八. 输入输出(IO)操作8.文件的压缩处理
Java.util.zip 包中提供了可对文件的压缩和解压缩进行处理的类,它们继承自字节流类OutputSteam 和 InputStream.其中 GZIPOutputStream 和 ZipOut ...