- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在尝试在 CRM 在线 2016 环境中实现新 CRM 的自动完成功能。
我使用了 Sample: Auto-complete in CRM controls 中的代码并已验证它适用于帐户表单和另一个已存在的自定义实体。但是,当我使用它 1 个特定的自定义实体及其任何字符串字段时,不会出现自动完成框。
尝试:
ext.getEventSource().showAutoComplete(resultSet);
任何人都知道什么可能是错误的?我认为它与我的实体或实体表单有关,而不是与代码或文本字段有关。
/** Sample JavaScript code to demonstrate the auto-completion feature.
This sample configures the auto-complete feature for the "Account Name"
field in the account form. */
function suggestAccounts() {
// List of sample account names to suggest
accounts = [
{ name: 'A. Datum Corporation', code: 'A01' },
{ name: 'Adventure Works Cycles', code: 'A02' },
{ name: 'Alpine Ski House', code: 'A03' },
{ name: 'Bellows College', code: 'A04' },
{ name: 'Best For You Organics Company', code: 'A05' },
{ name: 'Blue Yonder Airlines', code: 'A06' },
{ name: 'City Power & Light', code: 'A07' },
{ name: 'Coho Vineyard', code: 'A08' },
{ name: 'Coho Winery', code: 'A09' },
{ name: 'Coho Vineyard & Winery', code: 'A10' },
{ name: 'Contoso, Ltd.', code: 'A11' },
{ name: 'Contoso Pharmaceuticals', code: 'A12' },
{ name: 'Contoso Suites', code: 'A13' },
{ name: 'Consolidated Messenger', code: 'A14' },
{ name: 'Fabrikam, Inc.', code: 'A15' },
{ name: 'Fabrikam Residences', code: 'A16' },
{ name: 'First Up Consultants', code: 'A17' },
{ name: 'Fourth Coffee', code: 'A18' },
{ name: 'Graphic Design Institute', code: 'A19' },
{ name: 'Humongous Insurance', code: 'A20' },
{ name: 'Lamna Healthcare Company', code: 'A21' },
{ name: 'Litware, Inc.', code: 'A22' },
{ name: 'Liberty Delightful Sinful Bakery & Cafe', code: 'A23' },
{ name: 'Lucerne Publishing', code: 'A24' },
{ name: 'Margie Travel', code: 'A25' },
{ name: 'Munson Pickles and Preserves Farm', code: 'A26' },
{ name: 'Nod Publishers', code: 'A27' },
{ name: 'Northwind Electric Cars', code: 'A28' },
{ name: 'Northwind Traders', code: 'A29' },
{ name: 'Proseware, Inc.', code: 'A30' },
{ name: 'Relecloud', code: 'A31' },
{ name: 'School of Fine Art', code: 'A32' },
{ name: 'Southridge Video', code: 'A33' },
{ name: 'Tailspin Toys', code: 'A34' },
{ name: 'Trey Research', code: 'A35' },
{ name: 'The Phone Company', code: 'A36' },
{ name: 'VanArsdel, Ltd.', code: 'A37' },
{ name: 'Wide World Importers', code: 'A38' },
{ name: 'Wingtip Toys', code: 'A39' },
{ name: 'Woodgrove Bank', code: 'A40' }
];
var keyPressFcn = function (ext) {
try {
var userInput = Xrm.Page.getControl("name").getValue();
resultSet = {
results: new Array(),
commands: {
id: "sp_commands",
label: "Learn More",
action: function () {
// Specify what you want to do when the user
// clicks the "Learn More" link at the bottom
// of the auto-completion list.
// For this sample, we are just opening a page
// that provides information on working with
// accounts in CRM.
window.open("http://www.microsoft.com/en-us/dynamics/crm-customer-center/create-or-edit-an-account.aspx");
}
}
};
var userInputLowerCase = userInput.toLowerCase();
for (i = 0; i < accounts.length; i++) {
if (userInputLowerCase === accounts[i].name.substring(0, userInputLowerCase.length).toLowerCase()) {
resultSet.results.push({
id: i,
fields: [accounts[i].name]
});
}
if (resultSet.results.length >= 10) break;
}
if (resultSet.results.length > 0) {
ext.getEventSource().showAutoComplete(resultSet);
} else {
ext.getEventSource().hideAutoComplete();
}
} catch (e) {
// Handle any exceptions. In the sample code,
// we are just displaying the exception, if any.
console.log(e);
}
};
Xrm.Page.getControl("name").addOnKeyPress(keyPressFcn);
}
最佳答案
您必须在表单上有一个查找控件才能呈现自动完成功能。这听起来很奇怪,但这是目前最好的解决方法。我设置我的不可见。注意:这是任何查找字段,与您选择的关系无关。让查找字段在表单上设置一些内容以加载缺少的库。
我周末的大部分时间都在试图找出类似的情况。我可以详细描述导致这一发现的事件,但我会饶过你。
我认为 Microsoft 正试图不包含他们看不到已配置需求的资源,这就是后端自动完成文件丢失的原因(直到您为它们添加要求)。
关于javascript - CRM 2016 自动完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35469720/
我们使用的是在线版 CRM。我已经创建了一个自定义工作流,但我似乎无法找到任何可以告诉我如何调试它的信息。我读过的所有内容都是指将 pdb 文件复制到服务器 bin/assemblies 文件夹中。由
我正在尝试将 crm 4 插件转换为 CRM 2011。有谁知道 CRm 2011 中的相应类型是什么? Customer, CrmDateTime, CrmDecimal, CrmFloat, CB
我正在尝试将 crm 4 插件转换为 CRM 2011。有谁知道 CRm 2011 中的相应类型是什么? Customer, CrmDateTime, CrmDecimal, CrmFloat, CB
我们在 CRM 2015 中有特定要求,我们需要限制非 S/S 管理员用户在业务流程中的向后移动。 我遍历了客户端 API(包括升级 1 的脚本),但我没有找到任何 API 来使用任何公开的方法来实现
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 10年前关闭。 Improve this
必须从另一个 webresoucre 控件访问 Webresource 控件使用了以下 javascript , var webResource = $(window.parent.Xrm.Pag
在将解决方案从 CRM 2011 升级到 CRM 2015 时,我只将 crm 2011 解决方案导出 zip 中生成的 solution.xml 文件的标题更改为 然后导入crm 2015,导入成
我在 BIDS 中创建了大量报告,并将它们部署到我的 CRM 在线实例中。我遇到的问题是以下代码。 看起来很简单,但它给了我以下错误。 无效数据源:不支持报告类型。 Micro
我有一个与 this post 非常相似的问题 我已经为 Dynamics CRM 2015 安装了“Microsoft Dynamics CRM Report Authoring Extension
在我开始之前,我们的客户必须通过 AFDS 连接才能继续使用 CRM 2011。所以我们谈论的是“IFD”环境。 我在使用“CRM 2011 Outlook Client”和“Window.Open(
我注册了 Dynamic CRM 在线试用版(30 天)并创建了一个非托管自定义解决方案(新字段、一些自定义实体等)。现在,我想导出非托管解决方案并将其导入到我的服务器中的 Dynamic CRM O
我们正在 MS Dynamics CRM 2015 中对自引用实体进行建模。 一个例子是建筑物和建筑物的一部分(建筑群 ==> 独立建筑 ==> 入口 ==> 楼层 ==> 平面)。 有一些字段,如成
我们有一个系统,用户可以在其中以表格形式输入他的数据,然后我们将数据保存在 CRM 中(它在云中,因此我们无法访问它等等)。现在突然我们每次都开始出错,我们尝试发送数据。 我们得到的错误是:An un
我刚刚加载了高级查找,我无法点击一半的图标/下拉菜单,因为它们都在错误的位置。它在其他服务器和其他机器上运行良好。看起来好像是 CSS 问题。有任何想法吗 最佳答案 我在 Firefox 中遇到了同样
我正在使用带有简单 OData 的 Ms Dynamic Web Api。我需要为链接实体添加新记录。 我正在使用下面的代码片段并引用文档 https://github.com/object/Simp
我在 Dynamics CRM 中的客户和投资组合之间存在 1:N 关系即每个账户都有多个投资组合,每个投资组合都有特定的 Assets 。 我正在尝试在账户表格上创建一个字段,用于计算账户“所有相关
我在更新案例表单上 customerid 字段内的文本时遇到问题 如上图所示,我创建了一个名为“Test Contact”的联系人和一个名为“Test Account”的帐户。 我有一个在后台运行的工
爱尔兰于 3 月 27 日开始实行夏令时。从那时起,任何已添加到 Dynamics 的记录都将任何日期字段设置为比实际添加时间晚一小时。 奇怪的是,Web UI 正确返回日期,而使用 SQL Serv
我需要能够扩展在云中运行的 CRM 2011。我需要能够从一个完全独立的 Internet 网站执行 CRUD 操作。我有什么选择?我对 CRM 的经验为零。我刚刚发现 OOB Web 服务只能在 C
好吧,想象一下一家银行的调用中心充满了低信任度的员工。工作人员需要通过电话为客户提供基本服务。调用中心的工作人员接听客户的电话,询问他们某些安全问题,然后以某种方式为客户提供服务。 现在,从客户的角度
我是一名优秀的程序员,十分优秀!