Thursday, July 26, 2007

Enabling the Default Internet Explorer Context Menu

In addition to running in Application Mode, Microsoft CRM modifies the standard Internet Explorer behavior by displaying its own context menu when you right-click in the application. Right-clicking a grid gives you options unique to Microsoft CRM, such as Open, Print, and Refresh List. However, right-clicking a form won't display a context menu like you would see on a normal Web page. When you're troubleshooting and debugging, you might find that you want to access the standard Internet Explorer context menu so that you can use features such as View Source, Properties, or Open In New Window. You can re-enable the Internet Explorer context menu by editing the Global.js file.
Re-Enabling the Internet Explorer Standard Context Menu
  1. On the Microsoft CRM Web server, navigate to \_common\scripts (typically C:\Inetpub\wwwroot\_common\scripts).

  2. Open the Global.js file in Notepad (or any text editor). Note: Do not double-click this file because it will attempt to execute the JavaScript file.

  3. Right-click the file, and then click Edit.

  4. Use your text editor's Find feature to locate the document.oncontextmenu() function.

  5. Comment out the existing code in this function by adding /* and */ as shown in the following code. You can undo this change later by simply removing event.returnValue = true; line and the comment characters.

    function document.oncontextmenu()
    {
    event.returnValue = true;

    /*
    var s = event.srcElement.tagName;
    (!event.srcElement.disabled &&
    (document.selection.createRange().text.length > 0
    s == "TEXTAREA"
    s == "INPUT" && event.srcElement.type == "text"));
    */
    }

  6. Save the file.

  7. Open a page in Microsoft CRM and right-click it. You will see the familiar Internet Explorer context menu.



Caution

Use this technique on development servers only. Do not modify the Global.js file in a production or staging environment; this unsupported change might cause unpredictable behavior. Microsoft CRM prevents use of the right-click context menu for the user's benefit and also to maintain a predictable navigation structure in the application interface.

Application Mode and Loader.Aspx

Of course you've noticed that Microsoft CRM launches into a special Internet Explorer window that does not have the menu bar, address bar, toolbar, and so on. Microsoft CRM refers to this as the Application Mode, and it runs in this mode by default. Often, developers need these additional Internet Explorer features that application mode hides. You can launch Microsoft CRM in a standard Internet Explorer window by browsing to http://<crmserver>/loader.aspx.

Using the Loader.aspx page disables application mode for that single Web session. You can also permanently disable application mode for all users and all sessions by updating the Web.config file.

Disabling Application Mode
  1. On the Microsoft CRM Web server, navigate to \ (typically C:\Inetpub\wwwroot\).

  2. Open the Web.config file in Notepad (or any text editor).

  3. Look for the AppMode key, and change its value to Off.

  4. Save the Web.config file.

Wednesday, July 25, 2007

"Titan" Microsoft CRM 4.0

Currently the "Titan" Microsoft CRM 4.0 is in CTP.

New version of Microsoft Dynamics CRM delivers the power of choice to customers with on-premise, partner-hosted and Microsoft-hosted deployment models.

It also uses a single code base to support on-premise deployments as well as software-as-a-service (SaaS) deployments through hosting partners and the upcoming Microsoft Dynamics Live CRM service. The “Titan” release is an evolution of the popular Microsoft Dynamics CRM 3.0 product, and will offer a smooth upgrade path for existing on-premise and SaaS customers. It reinforces Microsoft’s long-term strategy to provide customers with the power of choice, with the ability to choose on-premise or SaaS deployments and access rich CRM capabilities within Microsoft® Office Outlook®, through a Web browser, and from a broad range of mobile devices.

Key improvements to Titan are:

  1. Multi-tenancy (handling multiple Microsoft CRM deployments on a single server - the ability to host multiple companies CRM data on a single server)
  2. Multi-language (supporting multiple languages in a single deployment)
  3. Even tighter integration with Microsoft Office 2007

Read more at: http://www.microsoft.com/presspass/press/2007/jan07/01-10CRMTAPPR.mspx

Callout vs. Workflow

You might find yourself wondering when you should use a pre- or post-callout versus when you should use a workflow rule. As you would expect, the answer depends on your situation. For instance, if you need to take an action before the data reaches the platform, you will have to use a callout (pre-callout in this case). If you would like the user to manually instantiate the action, a manual workflow rule would be used.

Remember that any action or event available in workflow can be done with the callout and the SDK. However, the reverse is not true. In general, keep your callout routines as simple and fast as possible. When processes become long, see whether you can transfer them to a workflow assembly for asynchronous processing.

We would recommend the following guidelines to help you decide when to use a callout versus a workflow assembly:

Use callouts

  • To alter data prior to submission to the platform.

  • To take action after an update to an entity. (Workflow does not provide an easy trigger mechanism for the update event.)

  • When you need a synchronous transaction and an immediate response.

  • To take action before or after the merging of two records or the deletion of a record.

  • When accessing custom entities that are organization-owned. Workflow can be used only on entities that have user ownership.

Use workflow

  • For all asynchronous actions—transactions that can be completed without having the user wait for their completion. A typical asynchronous action might be to send an e-mail message after some condition is met. The user usually wouldn't have to wait until the system created and sent the message.

  • For simple common tasks. The Workflow Manager has a list of actions, already built and available for use, that require no custom application development. Available actions include creating new records (such as Activities or Notes), sending e-mail messages, and updating values on related entities.

  • To allow more configuration options to the user who is creating the workflow logic. Because the user builds the workflow rule with the rule editor, he or she can also alter it without necessarily requiring programmatic interaction.

  • When you need a user to manually execute the necessary logic.