2
votes

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

From javascript I am currently using the window.open(...) method, but this opens an IE window. I have found references to the CRM internal openstdwin(...) method, but have been unable to use this method from my custom javascript within the MVC app. See below for code snippet.

Is it possible to open a CRM record in its “Outlook window” from a custom java script/standalone web app?

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

/// <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,

Regards Erlend

2

2 Answers

2
votes

As stated by ccellar, the Outlook windows are IE windows. By using:

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

I was able to hide the menu bar and address bar from the window. The custom popup windows is now almost equal to the native Outlook windows, except from icon and title, which is ok.

1
votes

The Outlook client does nothing else. All record windows which are opened by the Outlook client are IE windows. So you are perfectly fine to open the window itself.