Opening Forms using the Xrm.Utility.openEntityForm

Summary of article:

Xrm.Utility.openEntityForm

In Rollup 8 the Xrm.Utility.openEntityForm method was added. This method allows you to easily open a CRM form from javascript. Being able to open a form from javascript is not a new feature as have been able to build out a url for opening a form. However, the openEntityForm significantly simplifies the process and makes it much cleaner.

Using the openEntityForm

Opening a New Form

To simply open a form for creating a new record you can use the following line of code. Simply replace account with the entity of your choice.

Xrm.Utility.openEntityForm(“account”);

Open a Form with an Existing Record

If you want to open a specific record you just add the guid for that record like this:

Xrm.Utility.openEntityForm(“account”,”A85C0252-DF8B-E111-997C-00155D8A8410″);

Open a Form and Setting Values

You can set values on the form by sending along a list of parameters.

var parameters = {};

parameters["formid"] = “b053a39a-041a-4356-acef-ddf00182762b”;

parameters["name"] = “Test”;

parameters["telephone1"] = “(425) 555-1234″;

Xrm.Utility.openEntityForm(“account”, null, parameters);

For more on openFormEntity see http://blogs.msdn.com/b/crm/archive/2012/07/18/new-xrm-utility-functions-in-update-rollup-8-for-microsoft-dynamics-crm-2011-and-microsoft-dynamics-crm-online.aspx#openEntityForm

Xrm.Utility.openWebResource

In addition to a new method for opening a form, openWebResource was added to let you open a web resource from javascript.

Xrm.Utility.openWebResource(webResourceName,webResourceData,width, height)

For more on the openWebResource see http://blogs.msdn.com/b/crm/archive/2012/07/18/new-xrm-utility-functions-in-update-rollup-8-for-microsoft-dynamics-crm-2011-and-microsoft-dynamics-crm-online.aspx#openWebResource

 

 

 

 

 

One comment

  1. Janet says:

    Quick Question. I have implemented this sulotion and setup the configuration using the logical names of the entities, then went to each entity and published it. From there No rules were setup, and even though i can follow records, not changes that are made to the records are showing in my wall. I did install UR 6 on the server yesterday. Does anyone know if UR6 is not compatabile with Activity Feeds?

Leave a Reply

Your email address will not be published. Required fields are marked *

*


9 × two =

hermes kelly hermes Outlet hermes Store hermes birkin chanel classic flap louisvuitton handbags louis vuitton outlet cheap Balenciaga cheap louis vuitton