Dynamics CRM 2011 Outlook 客户端中的 JavaScript 弹出窗口

JavaScript pop-up in Dynamics CRM 2011 Outlook client

本文关键字:JavaScript 窗口 CRM 2011 Outlook 客户端 Dynamics      更新时间:2023-09-26

在我当前的项目中,我们创建了一个自定义的MVC 3 Web应用程序,该应用程序从用户和外部Web服务收集数据。收集数据后,我们需要在 Outlook 中打开 CRM 帐户记录。

从javascript中,我目前正在使用window.open(...)方法,但这会打开一个IE窗口。我找到了对CRM内部openstdwin(...)方法的引用,但无法在MVC应用程序中使用我的自定义javascript中的此方法。有关代码片段,请参见下文。

是否可以从自定义 java 脚本/独立 Web 应用程序在其"Outlook 窗口"中打开 CRM 记录?

我们正在使用 CRM 2011 和 Outlook 2007。MVC Web 应用托管在与 CRM 相同的服务器上的 IIS 中,但位于不同的站点/应用程序池/应用程序池标识下。

/// <reference path="../jquery-1.5.1.min.js"/>
/// <reference path="account.functions.js"/> 
/// <reference path="C:/Program Files/Microsoft Dynamics CRM/CRMWeb/_static/_common/scripts/Global.js"/>
// Open record – called on button click in MCV app
function openNewRecord() {
        var url = getNewNewAccountUrl(); // e.g. http://<server>/<org>/main.aspx?etc=1&amp;extraqs=%3fetc%3d1&amp;pagetype=entityrecord
        var name = "newWindow"; 
        var width = 800; 
        var height = 600; 
        var newWindowFeatures = "status=1";
        // Regular Jscript function to open a new window 
        //window.open(url); 
        // CRM function to open a new window, not working
        openStdWin(url, name, width, height, newWindowFeatures);

}

提前感谢,

问候埃伦德

正如ccellar所述,Outlook窗口是IE窗口。通过使用:

window.open(url, 'Account', 'scrollbars,resizable');

我能够从窗口中隐藏菜单栏和地址栏。自定义弹出窗口现在几乎等于本机 Outlook 窗口,除了图标和标题,这是可以的。

Outlook 客户端不执行任何其他操作。由 Outlook 客户端打开的所有记录窗口IE 窗口。因此,您可以打开窗口本身。