Microsoft Dynamics CRM 2011 – Start Dialog by using a URL


You can start an activated dialog by specifying the URL of the dialog. To do so, you must specify the URL in the following format:

http://CRMServer_Name/Org_Name/cs/dialog/rundialog.aspx?DialogId=DialogID&EntityName=EntityLogicalName&ObjectId=EntityObjectId

Where,

CRMServer_Name is the name of your Microsoft Dynamics CRM server.

Org_Name is the organization name.

DialogID is GUID of the dialog that you want to run.

EntityLogicalName is the entity logical name of the primary entity of the dialog that you want to run.

EntityObjectId is the GUID of the primary entity record.

A sample URL to start a dialog:

http://crmserver/AdventureWorksCycle/cs/dialog/rundialog.aspx?DialogId=9F53D2D8-AC54-46A6-A190-F23DE6677C65&EntityName=contact&ObjectId=41D1884E-B4B6-DF11-BF5E-00155DB05986

I hope this blog about ‘Microsoft Dynamics CRM 2011 – Start Dialog by using a URL’ was informative. Please feel free to leave your comments.

Advertisements
Post a comment or leave a trackback: Trackback URL.

Comments

  • Chris Turner  On September 24, 2012 at 11:14 PM

    Thank you for the information. Can you explain why an objectid guid is required? In my example I have a dialog which creates a new record but this dialog does not require any input from exisiting sources. I do not understand the purpose of passing the dialog an objectid.

    • Ashish Mahajan  On September 27, 2012 at 8:53 AM

      Hi Chris,

      Dialogs are opened from entity forms. Most of the time (depending on your business needs) they need some values from the entity record on which the dialog is running.

      Also we might need this objectid to pass it in a custom workflow step, to execute some code.

      In my projects I have always needed the objectid, so to access entity data.

      I hope the above helps.

      • Chris Turner  On September 28, 2012 at 8:13 PM

        Thanks Ashish. It makes sense given the scenario that you describe. However in my scenario I am opening the dialog from a grid and I don’t need an objectid in my dialog. Unfrotunately the dialog won’t open without an objectid in its URL so I have had to enable my dialog button only once a record in the grid is selected and then pass the id of the selected record as the objectid. In therory I assume that I could pass any valid guid as the objectid as I am not using it e.g. 00000000-0000-0000-0000-000000000000?

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: