• <legend id='khNr8'><style id='khNr8'><dir id='khNr8'><q id='khNr8'></q></dir></style></legend>

    <small id='khNr8'></small><noframes id='khNr8'>

        <bdo id='khNr8'></bdo><ul id='khNr8'></ul>

    1. <tfoot id='khNr8'></tfoot>
      <i id='khNr8'><tr id='khNr8'><dt id='khNr8'><q id='khNr8'><span id='khNr8'><b id='khNr8'><form id='khNr8'><ins id='khNr8'></ins><ul id='khNr8'></ul><sub id='khNr8'></sub></form><legend id='khNr8'></legend><bdo id='khNr8'><pre id='khNr8'><center id='khNr8'></center></pre></bdo></b><th id='khNr8'></th></span></q></dt></tr></i><div id='khNr8'><tfoot id='khNr8'></tfoot><dl id='khNr8'><fieldset id='khNr8'></fieldset></dl></div>

        覆盖 CRM 网格中双击事件调用的标准方法.

        Override standard method called by double click event in CRM grid.(覆盖 CRM 网格中双击事件调用的标准方法.)
      1. <i id='u8fcO'><tr id='u8fcO'><dt id='u8fcO'><q id='u8fcO'><span id='u8fcO'><b id='u8fcO'><form id='u8fcO'><ins id='u8fcO'></ins><ul id='u8fcO'></ul><sub id='u8fcO'></sub></form><legend id='u8fcO'></legend><bdo id='u8fcO'><pre id='u8fcO'><center id='u8fcO'></center></pre></bdo></b><th id='u8fcO'></th></span></q></dt></tr></i><div id='u8fcO'><tfoot id='u8fcO'></tfoot><dl id='u8fcO'><fieldset id='u8fcO'></fieldset></dl></div>

            <legend id='u8fcO'><style id='u8fcO'><dir id='u8fcO'><q id='u8fcO'></q></dir></style></legend>
          1. <small id='u8fcO'></small><noframes id='u8fcO'>

                  <bdo id='u8fcO'></bdo><ul id='u8fcO'></ul>
                    <tbody id='u8fcO'></tbody>
                  <tfoot id='u8fcO'></tfoot>

                  本文介绍了覆盖 CRM 网格中双击事件调用的标准方法.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  CRM 2011 中的以下情况:我的目标是在一个网格中显示多个实体.因此,我们制作了一个链接到真实实体的包装实体(包装实体到实体 A、B、C).当创建 A、B 或 C 中的项目时,插件也会创建一个包装实体项目.像这样我可以有一个网格,混合"所有实体,而实际上只显示包装实体的项目.

                  Following situation in CRM 2011: My goal is to show several entities in one grid. Therefore we made a wrapper entity which links to the real entity (wrapper entity to entity A, B, C). When an item in A, B or C is created, also an wrapper entity item is created by a plugin. Like this I can have a grid, "mixing" all the entities, while in fact only show the items of the wrapper entity.

                  当然,如果我双击或右键单击->在此网格中打开,我不想打开包装实体项,我直接想打开例如窗口.实体 A 项.丝带按钮是没问题的顺便说一句.

                  But of course, if I do a double click or right click -> open in this grid, I don't want to open the wrapper entity item, I directly want to open the window of e.g. entity A item. Ribbon Button is no problem btw.

                  到目前为止,我遵循了两条路线:

                  I followed two routes so far:

                  a) 链接替换:加载网格后,我通过 DOM 并将 oid、otype 和 otypename 替换为(真实)目标项(实体 A、B 或 C)的值.这个想法有两个缺点:首先何时执行替换例程(仅在加载时还不够,因为它可能在以后排序、过滤或翻转页面).第二个问题是功能区按钮.我想删除包装实体项目,而不是它背后的发票.当我替换所有这些 ID 时,事情变得混乱.我将不得不用自定义按钮替换所有按钮.

                  a) Link replacement: After the grid is loaded I went through the DOM and replaced the oid, otype and otypename with the values of the (real) target item (entity A, B or C). This idea has a two downsides: first when to execute the replacement routine (only on load is not enough as its possible to sort, filter or flip pages later). Second and man problem are the ribbon buttons. I want to delete the wrapper entity items and not the invoice behind it. Things get confused when I replace all those IDs. I would have to replace all the buttons by custom buttons.

                  b) 方法/事件替换:只替换调用项目详细信息窗口的事件会很优雅.不幸的是,我还没有弄清楚这些事件是如何在 CRM 中实现的,我希望取消附加一个事件并用我的替换它,但这似乎是一个隐藏的秘密.CRMWeb_static_gridAppGrid_DefaultData.htc 有 dblclick-event,但我不明白这是否是我正在寻找的事件以及如何取消附加.

                  b) Method/Event replacement: it would be elegant to just replace the event where the item detail window is called. Unfortunately I didn't figure out yet how the events are implemented in CRM, I was hoping to unattach an event and replace it by mine, but this seems to be a hidden secret. CRMWeb_static_gridAppGrid_DefaultData.htc has the dblclick-event, but I don't understand if this is the one I'm looking for and how to unattach.

                  有没有人尝试过替换 crm 网格中的事件处理程序或知道它是如何工作的?

                  Has anyone ever tried to replace an event handler in a crm grid or got an idea how it might work?

                  希望我的意思很清楚......

                  Hope it's clear what I mean...

                  非常感谢您的任何想法.

                  Thank you very much for any idea.

                  推荐答案

                  界面中事件的处理方式与 IE 处理所有 javascript 事件(请参阅 SO 问题 我应该直接分配 JavaScript 事件来统一代码吗? 仅举一个例子).

                  Events in the interface are handled the same way IE handles all javascript events (see the SO question Should i assign JavaScript events directly just to unify code? for just one example).

                  覆盖默认双击操作的功能可能如下开始:

                  A functionality for overriding the default doubleclick action might start as follows:

                  function Load() {
                      var grid = document.getElementById("myGridName");
                      grid.ondblclick = DoubleClickAction;
                  }
                  
                  function DoubleClickAction() {
                      var id, url;
                      //get the id of the entity in the row you double clicked
                      id = GetId();
                  
                      //generate the entity form url
                      url = GetUrl();
                  
                      //open the record window
                      OpenRecordWindow(url);
                  }
                  
                  function OpenRecordWindow(url) {
                      var url;
                  
                      if (Xrm.Page.context.isOutlookClient()) {
                          openStdWin(url, "Your Title", "width=1024,height=768,status=1");
                      }
                      else {
                          window.open(url);
                      }
                  
                  }
                  

                  <小时>

                  根据您的评论,您将在此处对 DOM 进行一些非常认真的自定义.您必须更改网格中每一行的 dblclick 事件每当网格刷新时,因为右键单击事件基于行的 dblclick 事件.因此,您必须找到网格并将 refresh 事件附加到将 dblclick 事件附加到任何找到的行的网格.


                  Based on your comments, you're getting into some pretty serious customization of the DOM here. You'd have to change the dblclick event for each row in the grid whenever the grid refreshes since the right click event is based on the row's dblclick event. So you'd have to find the grid and also attach a refresh event to the grid that attaches a dblclick event to any found rows.

                  要获取网格的 id 以及任何行的潜在 id,您可以使用 IE 的 F12 开发人员工具来浏览/搜索 HTML.

                  To get the id of the grid, and the potential ids of any rows, you can use IE's F12 developer tools to browse/search through the HTML.

                  这篇关于覆盖 CRM 网格中双击事件调用的标准方法.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  quot;Status Code:200 OK (from ServiceWorker)quot; in Chrome Network DevTools?(“状态码:200 OK(来自 ServiceWorker)在 Chrome 网络开发工具中?)
                  How to set a header for a HTTP GET request, and trigger file download?(如何为 HTTP GET 请求设置标头并触发文件下载?)
                  Adding custom HTTP headers using JavaScript(使用 JavaScript 添加自定义 HTTP 标头)
                  SQL Query DocumentDB in Azure Functions by an integer not working(通过整数在 Azure Functions 中 SQL 查询 DocumentDB 不起作用)
                  Azure Functions [JavaScript / Node.js] - HTTP call, good practices(Azure Functions [JavaScript/Node.js] - HTTP 调用,良好实践)
                  Azure Functions - Import Custom Node Module(Azure Functions - 导入自定义节点模块)

                  <small id='JHxJP'></small><noframes id='JHxJP'>

                    <legend id='JHxJP'><style id='JHxJP'><dir id='JHxJP'><q id='JHxJP'></q></dir></style></legend>
                      <tbody id='JHxJP'></tbody>

                      1. <tfoot id='JHxJP'></tfoot>
                          <bdo id='JHxJP'></bdo><ul id='JHxJP'></ul>
                          <i id='JHxJP'><tr id='JHxJP'><dt id='JHxJP'><q id='JHxJP'><span id='JHxJP'><b id='JHxJP'><form id='JHxJP'><ins id='JHxJP'></ins><ul id='JHxJP'></ul><sub id='JHxJP'></sub></form><legend id='JHxJP'></legend><bdo id='JHxJP'><pre id='JHxJP'><center id='JHxJP'></center></pre></bdo></b><th id='JHxJP'></th></span></q></dt></tr></i><div id='JHxJP'><tfoot id='JHxJP'></tfoot><dl id='JHxJP'><fieldset id='JHxJP'></fieldset></dl></div>