Advertisements
Home > CRM 2011, JScript > Xrm.Utility functions to open Entity forms or Web resources

Xrm.Utility functions to open Entity forms or Web resources

In CRM, we can open the entity forms using “window.open” method

  • With UR 8, a couple new client-side JavaScript functions were added to open entity forms and web resources
  • These functions fixes the prompt the user to login again issue when you use “window.open” to open form or web resource from CRM online/Outlook client

Xrm.Utility

The Xrm.Utility object provides a container for useful functions. Following MSDN blog which talks extensively on the same

For quick glance below are few samples

Open a new “Account” record form

Xrm.Utility.openEntityForm(“account”); // Pass ‘Account’ schema name

Open an existing “Account” record form

Xrm.Utility.openEntityForm(“account”,”A85C0252-DF8B-E111-997C-00155D8A8410″); // Pass ‘Account’ schema name & GUID

Open a new “Account” record 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 an HTML web resource named “new_webResource.htm”

Xrm.Utility.openWebResource(“new_webResource.htm”);

🙂

Advertisements
  1. December 4, 2012 at 11:04 PM

    Reblogged this on Shahzad Sarang gloB's.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: