我想使用纯Javascript从MS Dynamics CRM Online 2015添加/检索数据
I want to add/retrieve data from MS Dynamics CRM Online 2015 using pure Javascript
我想通过CRM 2015中的javascript用加载中的另一个实体的一些数据更新一个实体。是否可以?
在CRM 2011中,我使用了以下代码:
var xml = '' +
'<?xml version=''1.0'' encoding=''utf-8''?>' +
'<soap:Envelope xmlns:soap=''http://schemas.xmlsoap.org/soap/envelope/'' xmlns:xsi=''http://www.w3.org/2001/XMLSchema-instance'' xmlns:xsd=''http://www.w3.org/2001/XMLSchema''>' +
' <soap:Header>' +
' <CrmAuthenticationToken xmlns=''http://schemas.microsoft.com/crm/2007/WebServices''>' +
' <AuthenticationType xmlns=''http://schemas.microsoft.com/crm/2007/CoreTypes''>0</AuthenticationType>' +
' <OrganizationName xmlns=''http://schemas.microsoft.com/crm/2007/CoreTypes''>OrganizationName </OrganizationName>' +
' <CallerId xmlns=''http://schemas.microsoft.com/crm/2007/CoreTypes''>00000000-0000-0000-0000-000000000000</CallerId>' +
' </CrmAuthenticationToken>' +
' </soap:Header>' +
' <soap:Body>' +
' <RetrieveMultiple xmlns=''http://schemas.microsoft.com/crm/2007/WebServices''>' +
' <query xmlns:q1=''http://schemas.microsoft.com/crm/2006/Query'' xsi:type=''q1:QueryExpression''>' +
' <q1:EntityName></q1:EntityName>' +
' <q1:ColumnSet xsi:type=''q1:ColumnSet''>' +
' <q1:Attributes>' +
' <q1:Attribute></q1:Attribute>' +
' </q1:Attributes>' +
' </q1:ColumnSet>' +
' <q1:Distinct>false</q1:Distinct>' +
' <q1:Criteria>' +
' <q1:FilterOperator>And</q1:FilterOperator>' +
' <q1:Conditions>' +
' <q1:Condition>' +
' <q1:AttributeName>new_estadoid</q1:AttributeName>' +
'<q1:Operator>Equal</q1:Operator>' +
'<q1:Values>' +
'<q1:Value xsi:type=''xsd:string''>' + "" + '</q1:Value>' +
'</q1:Values>' +
' </q1:Condition>' +
' </q1:Conditions>' +
' </q1:Criteria>' +
' </query>' +
' </RetrieveMultiple>' +
' </soap:Body>' +
'</soap:Envelope>' +
'';
看看CRM SDK,它包括一个javascript文件SDK.REST.js,它将允许您通过一个简单的调用来执行RetrieveMultipleRecords。
建议您下载(Dynamics CRM SDK):
https://msdn.microsoft.com/en-us/library/hh547453.aspx
这个页面展示了如何使用SDK.REST.js从CRM:中检索记录
https://msdn.microsoft.com/en-us/library/gg985387.aspx
简而言之,您可以调用SDK.REST.removeeMultipleRecords()函数,并从JavaScript中获取所需的数据。
不确定,但您正在做的事情可能有点太复杂,无法完成此任务。您可以在没有javascript的情况下实现这一功能。我正在MS CRM 2013内部解决同样的问题,可以与您分享我所学到的,希望它也适用于您。
您可以构建工作流(流程:https://technet.microsoft.com/en-us/library/dn531067.aspx)在需要信息的实体上创建新记录之前被触发的系统上,添加源实体的动态值以在加载时显示在创建表单上。
您可以参考这篇文章来解释此解决方案的一些步骤:https://www.salentica.com/crm-2013-real-time-workflows/
*需要注意的是,这两个实体必须与系统中定义的关系相关。
- 在MSCRM 2015中使用javascript限制多实体查找
- 如何在调试模式停止后查看Visual Studio 2015 Javascript控制台
- 他们是如何使用angular/jqLite find()方法按属性名称和值选择元素的?ng conf 2015
- ES6 (ECMAScript 2015) 模块:导入索引.js
- JS:如何将字符串(“2015年3月10日”)转换为Date对象
- ECMAScript 2015(ECMAScript6)是否具有类初始值设定项
- Visual Studio 2015 Update 2-'中的TypeScript模块;要求'未定义
- 我想使用纯Javascript从MS Dynamics CRM Online 2015添加/检索数据
- Visual Studio 2015 JavaScript Intellisense 奇怪的行为
- SharePoint Online 共享,主机站点上未启用 NoScript
- 剑道 UI - 自定义数字格式在 2015.3.1111 > 2016.1.412 之间更改
- Visual Studio 2015 NodeJS/Typescript 覆盖节点启动文件
- 如何使用offline.js或带有提交按钮的online.js
- 如何在页面上显示时间、日期IP和URL?更新日期:2015年2月25日
- 从'获取本月的最后一天;2015-02-23'字符串(javascript)
- 无法从SharePoint online 2013在Office客户端中打开Microsoft Office文件
- 正在分析CSS背景图像2015
- 减去2015-12-31的1个月得出2015-12-01
- 针对2015-16学年的javascript验证
- Dynamics CRM 2015 Online: SubGrid's controlSetParameter方