JavaScript popup in Outlook client Dynamics CRM 2011

In my current project, we have created a custom MVC 3 web application that collects data from the user and external web services. After we have collected the data, we have a requirement to open a CRM account record in Outlook.

From javascript I am currently using the window.open (...) method, but this opens an IE window. I found links to the internal CRM method openstdwin (...) but was unable to use that method from my custom javascript in an MVC application. Below is a code snippet.

Is it possible to open a CRM entry in my "Outlook window" from a custom java script / standalone web application?

We are using CRM 2011 and Outlook 2007. The MVC web application is hosted in IIS on the same server as the CRM, but under a different ID Site / appPool / appPool.

/// <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);

      

}

Thanks in advance,

Best regards Erlend

+2


source to share


2 answers


The Outlook client does nothing. All entry windows opened by the Outlook client are IE windows. Therefore, you can perfectly open the window.



+1


source


As pointed out by ccellar, Outlook windows are IE windows. Using:

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

      



I was able to hide the menu bar and address bar from the window. Custom pop-ups are now almost equal to native Outlook windows except for the icon and title, which is fine.

+2


source







All Articles