crm使用soap删除关系
来源:互联网 发布:局域网网络限速软件 编辑:程序博客网 时间:2024/05/29 02:10
//C# 代码:
//DeleteRelationshipRequest request = new DeleteRelationshipRequest();
//request.Name = "new_account_new_account_product";
//DeleteRelationshipResponse response = (DeleteRelationshipResponse)service.Execute(request);
//例子
function demo() {
//关系名称
var name = "new_account_new_account_product";
deleteRelationship(name);
}
function deleteRelationship(name) {
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' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>";
request += "<request i:type='a:DeleteRelationshipRequest' xmlns:a='http://schemas.microsoft.com/xrm/2011/Contracts'>";
request += "<a:Parameters xmlns:b='http://schemas.datacontract.org/2004/07/System.Collections.Generic'>";
request += "<a:KeyValuePairOfstringanyType>";
request += "<b:key>Name</b:key>";
request += "<b:value i:type='c:string' xmlns:c='http://www.w3.org/2001/XMLSchema'>"+ name +"</b:value>";
request += "</a:KeyValuePairOfstringanyType>";
request += "</a:Parameters>";
request += "<a:RequestId i:nil='true' />";
request += "<a:RequestName>DeleteRelationship</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删除关系
- crm使用soap删除记录
- crm使用soap删除字段
- crm使用soap删除实体
- crm使用soap删除下拉框选项
- crm使用soap删除下拉框
- crm使用soap批量删除数据
- crm使用soap分配记录
- crm使用soap发布应用程序
- crm使用soap启用和停用记录
- crm使用soap操作商机丢单
- crm使用soap操作商机赢单
- crm使用soap创建下拉框
- crm使用soap插入下拉框选项
- crm使用soap取消用户访问记录权限
- crm使用soap更改下拉框的文本值
- Dynamic CRM 2016使用WEB API删除记录(js)
- CRM订单表关系
- POJ2752 C代码
- 从搜索引擎优化的角度看域名包含关键词的重要性
- web.xml中listner标签的作用
- Android学习——content provider
- 杭电 1196
- crm使用soap删除关系
- Excel_VBA:根据条件设定背景色
- Java远程访问Domino数据库—DIIOP(2)
- 哈希表
- 测试流程积累
- OC学习(二)实例变量的可见度和几种常用方法
- hdu 1106排序
- 使用jq工具在Shell命令行处理JSON数据
- Andriod开发技巧——Fragment的懒加载