Tuesday, November 6, 2012


Well, I was not aware of this new object created by Microsoft, since Microsoft Dynamics CRM 2011 Update Rollup 8. (http://msdn.microsoft.com/en-us/library/jj602956.aspx)

It has 2 function (both open a new browser window) called:


Open a new account record
Open an existing account record

Open a new account record with a specific form and setting default values
var parameters = {};
parameters["formid"] = "b053a39a-041a-4356-acef-ddf00182762b";
parameters["name"] = "Test";
parameters["telephone1"] = "(425) 555-1234";
Xrm.Utility.openEntityForm("account", null, parameters);
Open a new contact record, move it to the top left corner of the screen, and set the size of the window 
NoteYou cannot use window object methods such as moveTo or resizeTo in scripts that will run in Microsoft Dynamics CRM for Microsoft Office Outlook.
var newWindow = Xrm.Utility.openEntityForm("contact");

    Xrm.Utility.openWebResource(webResourceName,webResourceData,width, height)
Open an HTML web resource named “new_webResource.htm”:Xrm.Utility.openWebResource("new_webResource.htm");
Open an HTML web resource including a single item of data for the data parameter”Xrm.Utility.openWebResource("new_webResource.htm","dataItemValue");
Open an HTML web resource passing multiple values through the data parameter
var customParameters = encodeURIComponent("first=First Value&second=Second Value&third=Third Value"); Xrm.Utility.openWebResource("new_webResource.htm",customParameters); 
NoteThese values have to be extracted from the value of the data parameter in the HTML web resource. For more information, see Sample: Pass Multiple Values to a Web Resource Through the Data Parameter.
Open an HTML web resource with the parameters expected by HTML web resources:

No comments:

Post a Comment