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&extraqs=%3fetc%3d1&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