Archive

Archive for December, 2009

How to Configure Microsoft Dynamics CRM 4.0 E-mail Router (On-Premise) with Microsoft Exchange Server 2010

December 22, 2009 6 comments

Update Rollup 8 for Microsoft Dynamics CRM E-mail Router (On-Premise) includes support for Microsoft Exchange Server 2010. In continuation to the blog titled “Configure Microsoft Dynamics CRM Online E-mail Router with Exchange Online”, this one explains the detailed steps required to setup Microsoft Dynamics CRM 4.0 E-mail Router (On-Premise) with Microsoft Dynamics CRM 4.0 On-Premise users and queues having mailboxes in Microsoft Exchange Server 2010.

Microsoft Exchange Server 2010 replaces the WebDAV functionality with Exchange Web Services (EWS). Microsoft Dynamics CRM 4.0 E-mail Router (On-Premise) with Update Rollup 8 has been enhanced to integrate EWS support and hence function with Microsoft Exchange Server 2010. The E-mail Router maintains compatibility with Exchange 2003 (only WebDAV) and Exchange 2007 (both WebDAV and EWS).

Prerequisites

  • Microsoft Dynamics CRM 4.0 On-Premise installation.
  • Microsoft Exchange Server 2010.
  • Microsoft Dynamics CRM 4.0 E-mail Router (On-Premise) with Update Rollup 8 or higher.

Configuration Steps

Microsoft Exchange Server 2010 

Granting Exchange Impersonation permissions.

Microsoft Exchange Server 2010 makes do with the permissions model used in Microsoft Exchange Server 2007 and adopts the new Role Based Access Control (RBAC) allowing users to define extremely broad or extremely precise permissions models based on the roles of administrators and users. New commands are available to allow User/Mailbox Impersonation with varying scopes. Exchange Impersonation permission is required for a given Exchange 2010 account if it needs to cater to multiple Exchange 2010 accounts. The profile created with a user account having Exchange Impersonation permission can access the mailboxes of the users who are in the scope of this Exchange Impersonation permission.

In the Microsoft Exchange Server 2010 system, launch Exchange Management Shell from Start-> All Programs-> Microsoft Exchange Server 2010 -> Exchange Management Shell. The shell will connect to the Microsoft Exchange Server 2010 and display the prompt.

[PS] C:\Windows\System32>.

clip_image001

Example: impersonation scenarios

1. A single user is configured to connect to mailboxes of all other CRM users and queues that have their mailboxes on Microsoft Exchange Server 2010. This configuration hence makes do with the need to create profile for each CRM user and queue individually.

To achieve this you need to run the following command in Exchange Management Shell–

 

New-ManagementRoleAssignment   –Name: “ImpersonationName

-User: “RouterAdministrator@YourOrganization.com”   –Role:”ApplicationImpersonation”

 

In the above command, the Name parameter specifies a name for the new management role assignment. User is the username of the user who is given Exchange Impersonation permission and therefore can now access Exchange 2010 mailboxes of all other users in the Exchange organization.

[Details on New-ManagementRoleAssignment can be found here]

2. A single user is configured to connect to mailboxes of select set of CRM users and queues that have their mailboxes on Microsoft Exchange Server 2010. This configuration is preferable as the impersonation rights are given selectively on the desired mailboxes only.

To enable this scenario, you need to define the set of users as a Management Scope in Microsoft Exchange Server 2010. To do so, run the following command in Exchange Management Shell–

New-ManagementScope   –Name: “ManagementScopeName” 

–RecipientRestrictionFilter { Name  -eq  ‘ crmuser1 ’ }

 

In the above command, The Name parameter specifies the name of the management scope. The RecipientRestrictionFilter parameter specifies the filter to apply to recipient objects.

[Details on New-ManagementScope can be found here]

 

The new Management Scope created can now be used in the Role Assignment command to restrict the scope of Exchange Impersonation.

New-ManagementRoleAssignment   –Name: “ImpersonationName

-User: “RouterAdministrator@YourOrganization.com”   –Role:”ApplicationImpersonation”

-CustomRecipientWriteScope: ”ManagementScopeName

 

Removing Exchange Impersonation permission.

Exchange Impersonation permission can be removed using the

Remove-ManagemntRoleAssignment command.

[Details on Remove-ManagemntRoleAssignment can be found here]

Microsoft Dynamics CRM 

Configure users and queues to use Microsoft Dynamics CRM E-mail Router.

Users and Queues in CRM can be configured to use the E-mail Router for processing the incoming Exchange and outgoing CRM e-mails. To utilize this functionality, Users and Queues must have a valid email address and select E-mail Router as the incoming and outgoing E-mail access types. This can be setup by an administrator or users having relevant permissions.

CRM Users

1. Navigate to Settings->Administration->Users and configure the user record as displayed.

clip_image002

  1. Individual users can select which e-mails from the specified Exchange On-Premise mailbox to Track in CRM. This can be selected from the Tools->Options-> E-mail tab.

clip_image003

CRM Queues

  1. Navigate to Settings->Business Management->Queues and configure the Queue as displayed.
    clip_image004
  1. In line with Users, Queue form also provides the flexibility to choose the desired category of e-mails which need to be promoted to Microsoft CRM.
    clip_image005

Microsoft Dynamics CRM 4.0 E-mail Router (On-Premise)

After the Router has been installed, launch the E-mail Router Configuration Manager from Start-> All Programs-> Microsoft Dynamics CRM E-mail Router. There are three main tabs in the Configuration Manager as shown below.

clip_image007

Configuration Profiles. To configure the E-mail Router, you first create one or more incoming and one or more outgoing configuration profiles. These configuration profiles contain information about the e-mail server and authentication methods that the E-mail Router will use to connect to the e-mail server and transfer e-mail messages to and from the Microsoft Dynamics CRM organization. You create configuration profiles on the Configuration Profiles tab in the E-mail Router Configuration Manager.

Deployments. After you create the configuration profiles that you want, you must define at least one deployment. The information that you enter into the Deployment area will be used by the E-mail Router to connect to your Microsoft Dynamics CRM deployment.

Users, Queues and Forward Mailboxes. After you have the configuration profiles and deployment established, then you manage the users, queues, and forward mailboxes that will be used by the E-mail Router to route Microsoft Dynamics CRM e-mail messages. You manage these items on the Users, Queues, and Forward Mailboxes tab in the E-mail Router Configuration Manager.

Creating Exchange Server 2010 incoming profile.

  1. In the E-mail Router Configuration Manager tool, click the Configuration Profiles tab, and then click New.
  2. Type a profile name. For example, type Exchange 2010 Incoming Email.
  3. Choose Incoming in the Direction list.
  4. Choose Exchange Web Services as the Protocol.
  5. Choose Exchange 2010 as the E-mail Server Type.
  6. The only Authentication Type allowed is “Windows Authentication”.
  7. Type the name of the Microsoft Exchange Server 2010 web services URL.

Default Location
https://<Exchange-2010-Server-Name>/EWS/Exchange.asmx

clip_image008

8. Select how the e-mail Router will gain access to the Microsoft Exchange Server 2010 in the Access Credentials list.

  • If you select Local System Account for the Profile, the Router will use the credentials specified in the Microsoft CRM Email Router service running in the host machine. The credentials provided should be the username of user in your Microsoft Dynamics CRM organization who has the System Administrator role. This user must have Exchange Impersonation permission on the mailboxes that this Incoming Profile will serve including self. This type of profile is typically used for polling large number of mailboxes using the credentials of a user with Administrative privileges and Exchange Impersonation permissions.
  • If you select User Specified for the Profile, the Router will use the user name and password provided in Microsoft Dynamics CRM for users who are configured to use this Incoming Profile.
  • If you select Other Specified for the Profile, the Router will use the user name and password provided in the open textboxes as shown below. User name has to be provided in the form DomainName\UserName. The specified user must have Exchange Impersonation permission on all the mailboxes that this Incoming Profile will serve (Exchange Impersonation Permissions on self is not required).

Note: The above steps can also be used to create an incoming profile for a CRM user having Microsoft Exchange Server 2007 mailbox by choosing Exchange 2007 as the Email Server Type in step 5.

Creating Exchange Server 2010 outgoing profile.

Microsoft Dynamics CRM 4.0 Email Router (On-Premise) with Update Rollup 8 supports SMTP as the default and only protocol for outgoing e-mail messages as in the case of previous versions.

  1. In the E-mail Router Configuration Manager tool, click the Configuration Profiles tab and then click New.
  2. Type a profile name. For example, type Exchange 2010 Outgoing Email.
  3. Choose Outgoing in the Direction list.
  4. The only Protocol allowed is SMTP.
  5. Verify that SMTP is selected as the E-mail Server Type.
  6. Choose the Authentication Type as appropriate.

clip_image009

  1. Type only the name of the Microsoft Exchange Server 2010 system in the Location field.
  2. Check SSL box if the Microsoft Exchange Server 2010 uses SSL for SMTP.
  3. Select and provide the appropriate Access Credentials with Exchange Impersonation permission as required. [See section on Granting Exchange Impersonation permission for details]

Configure the Microsoft Dynamics CRM On-Premise deployment.

After you have created the outgoing and incoming e-mail profiles, click the Deployments tab in the E-mail Router Configuration Manager tool.

  1. Click New to create a new deployment. The default Deployment option will be set to My Company.
  2. In the Microsoft Dynamics CRM Server open text box it will default to http://discovery/<OrganizationName>. Replace discovery with the name of the Microsoft Dynamics CRM On-Premise Server and <OrganizationName> with your Microsoft Dynamics CRM Organization Unique Name.
    Note: The Organization Unique Name is case-sensitive.
  3. Verify that Microsoft Dynamics CRM secure URL Port contains valid value if the CRM server is SSL enabled. clip_image010
  1. Select how the e-mail Router will gain access to the Microsoft Exchange Server 2010 in the Access Credentials list.
  •  
    • If you select Local System Account, the Router will use the credentials specified in the Microsoft CRM Email Router service running in the host machine.
    • If you select Other Specified, the Router will use the user name and password provided in the open textboxes as shown below. User name has to be provided in the form DomainName\UserName.

    5. In the Incoming configuration profile, select the incoming profile you created.

  1. In the Outgoing configuration profile, select the outgoing profile you created.
    Note: Setting the Incoming and Outgoing configuration profiles on the Deployment will make these the default profiles for the users that are set to use the E-mail Router for incoming and outgoing e-mail. You can change it for each user in the Users, Queues and Forward Mailboxes tab.
  2. Click OK to finish creating the deployment.

Forward Mailbox

Forward Mailbox is one of the options available for processing the incoming e-mails in Microsoft CRM. This option is helpful in scaling the system where all the Forward Mailbox users and queues have all their e-mails forwarded to the Forward Mailbox using Exchange forwarding rules. Emails for multiple users and queues are present in this single E-mail box as an attachment and hence Router can promote them to Microsoft Dynamics CRM using the single polling location. Users and Queues can have this options set for incoming e-mails processing as follows.

  • Users: Settings->Administration->Users
  • Queues: Settings->Business Management-> Queues

clip_image012

Set up the Forward Mailbox.

  1. Open the Microsoft Dynamics CRM E-mail Router Configuration tool.
  2. Click the Users, Queues and Forward Mailboxes tab.
  3. In the Select a CRM Deployment to view users and mailboxes list, select the Microsoft Dynamics CRM deployment you created.

clip_image013

  1. Click Load Data. This will display the Microsoft Dynamics CRM users who are configured to use the Email Router for processing their e-mails.
    Note: If you receive an error displaying the users, verify the correct organization name is listed in the Select a CRM Deployment to view users and mailboxes list. Also, verify the organization name is entered with the correct case. The organization name is case-sensitive.
    Note: If no users are listed after you click Load Data, or if you are missing users, check the user’s settings by following the steps in the section titled “Configure users and queues to use Microsoft Dynamics CRM E-mail Router.”
  2. Click the Forward Mailboxes tab, and then click the New.
  3. Type a name for the forward mailbox profile. For example type ForwardMailbox in the Name open text box.
  4. Type the e-mail address for the forward mailbox in the E-mail Address open text box.
  5. Click OK

Deploy Exchange rules manually through Microsoft Exchange Server 2010.

In order to use the forward mailbox feature Microsoft Exchange Server 2010 users need to manually create rules on their own mailboxes from OWA or using Outlook client. This can be done by using the Rule Deployment Wizard for Microsoft Exchange Server 2007 and earlier systems. In Microsoft Exchange Server 2010 they will need to manually setup a rule with the following logic:

clip_image014

Forward All e-mails as An Attachment to <a mailbox you defined in your system>

This rule will forward all incoming e-mail to the Microsoft Dynamics CRM forwarding mailbox. After the rules have been deployed, any e-mail that is received in a user’s mailbox will be forwarded as an attachment to the forwarding mailbox. The Microsoft Dynamics CRM E-mail Router Service monitors the forward mailbox. The service will route Microsoft Dynamics CRM e-mail to Microsoft Dynamics CRM as an e-mail activity. If the e-mail is not related to Microsoft Dynamics CRM, the service will delete the e-mail message from the forwarding mailbox.

Test and publish the new incoming /outgoing profiles and deployment.

The final step is to publish new incoming profiles, the deployment and forward mailbox settings. Before publishing, connectivity to all mailboxes using the specified profiles must be tested. To do this, complete the following steps:

  1. Click the Users, Queues and Forward Mailboxes tab within the E-mail Router Configuration Manager tool.
  2. In the Select a CRM Deployment to view users and mailboxes list, select the Microsoft Dynamics CRM deployment you created.
  3. Click Load Data. This will display the Microsoft Dynamics CRM users configured to use the e-mail Router. clip_image015

Note: If you receive an error loading the data, verify the correct organization unique name is listed in the Select a CRM Deployment to view users and mailboxes list. Also, verify the organization unique name is entered with the correct case. The organization unique name is case sensitive. If no users are listed after you click Load Data, or if you are missing users, check the user’s settings. Also Forward Mailbox users and queues do not have the option of assigning the incoming profiles because the forward mailbox is directly used for the incoming E-mail processing.

  1. If you want to change the Incoming or Outgoing configuration profiles for certain users, double click the user and change the selection for the Incoming Configuration Profile or Outgoing Configuration Profile and click OK.
  2. Click Test Access. Tests will be performed on all users for both profiles. A successful test will display a green succeeded message that resembles the following:
    clip_image016
  3. To publish the deployment, click Publish. A successful publish will display the following message: 

clip_image018

On publishing the Router will start catering the Microsoft CRM Users and Queues having the Microsoft Exchange Server 2010 mailboxes.

Cheers,

Ravindra R Upadhya

Simplify your life with JavistaCRM

CRM for iPhone

Download JavistaCRM on iPhone v1.5

Start your trial experience of JavistaCRM

FAQ concerning JavistaCRM

Question, Feedback or to be a partner

Using the Microsoft Translator inside Microsoft Dynamics CRM v4

December 22, 2009 Leave a comment

This customization is designed to call the ‘Microsoft® Translator’ service from within CRM. This example uses a custom button, included in an entity form, to call the service and translate text (which has been selected by the user) into another language.

This document describes the steps required to include the custom button on a form, how to call the service and how to set the language of both the source and target text.

NOTE: This customization is designed for use with Internet Explorer (IE) 7 or higher.

Adding the “Translate” button to a form

– Navigate to “Settings\Customizations\Export Customization”

– Select “ISVconfig” and click on “Export Selected Customizations”

– Save the “customizations.zip” file to a convenient location and expand it so that you can edit the customizations.xml file.

– Add these lines to the toolbar section for your chosen entity:

<Button Icon="/_imgs/ico_18_debug.gif" JavaScript="crmTranslator.TranslateText()">
<Titles>
<Title LCID="1033" Text="ToolBar Translate" />
</Titles>
<ToolTips>
<ToolTip LCID="1033" Text="Translate selected text" />
</ToolTips>
</Button>

– Now, click on “Import customizations” and upload the customizations.xml file

– Publish your customizations

– Navigate to “Settings\Administration\System Settings” and in the “Customizations” tab ensure that the client you intend to view this customization with is selected.

You should now be able to see the button on your chosen form.

          clip_image002

Changing the Title and Tooltip text of the button

To change (edit) the text that appears in the button, or the tooltip, simply change the highlighted portions as indicated below:

<Button Icon="/_imgs/ico_18_debug.gif" JavaScript="Tx_Selected();">
<Titles>
<Title LCID="1033" Text="ToolBar Translate" />
</Titles>
<ToolTips>
<ToolTip LCID="1033" Text="Translate selected text" />
</ToolTips>
</Button>

You will again need to ‘import’ and ‘publish’ the customization before you will see your changes.

If localizing the Title and Tooltip, you should also change the LCID reference when editing the text. The example here shows a change to the French LCID:

<Button Icon="/_imgs/ico_18_debug.gif" JavaScript="Tx_Selected();">
<Titles>
<Title LCID="1036" Text="Traduire" />
</Titles>
<ToolTips>
<ToolTip LCID="1036" Text="Traduire du texte sélectionné" />
</ToolTips>
</Button>

In a multi-lingual deployment of CRM (where additional language packs are installed) you may want the button text and tool tip to change based on a user’s language settings. In this case you will need to add a new Locale ID (LCID) line for each language you’d like to included, both in the Title and Tooltip section. In the below example, both English and French are included:

<Button Icon="/_imgs/ico_18_debug.gif" JavaScript="Tx_Selected();">
<Titles>
<Title LCID="1033" Text="ToolBar Translate" />
<Title LCID="1036" Text="Traduire" />
</Titles>
<ToolTips>
<ToolTip LCID="1033" Text="Translate selected text" />
<ToolTip LCID="1036" Text="Traduire du texte sélectionné" />
</ToolTips>
</Button>

 

For a full list of Locale ID codes (LCID Dec) assigned by Microsoft, please see the reference on the Microsoft Developer Network. http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx

Adding the “Powered by” gif to the translation window

To add the “poweredby.gif” image to the translation window, you should create a folder for your customization in the “CRMWeb\ISV folder on your server, for example “CRMWeb\ISV\CRMTranslator”. “Copy the gif file (poweredby.gif) included in the download into to this folder.

                clip_image004

Add the code to the form’s OnLoad() function

You have specified the script action “crmTranslateSample.TranslateText()”, so you now need to define this. You need to firstly define the function in the forms “OnLoad()” event. Then create the namespace “crmTranslateSample” and attach the function. This is done to safeguard against upgrades and QFE’s potentially introducing CRM functions with the same name which we could then break with our duplicate function name – for more info and another example see this blog post: http://blogs.msdn.com/crm/archive/2009/06/08/new-dependent-picklist-sample.aspx

 

NOTE: You will need you own Developer AppId to supply in the call to “Translate” (see info here: http://social.msdn.microsoft.com/Forums/en-US/microsofttranslator/thread/07fdad5c-82b9-4646-9d4a-48e580b89862 )

 

– Navigate to “Settings\Customizations\Customize Entities”

– Click on the entity to whose form you want to add the translator – for example: “account”

– When the web dialog opens, click on “Forms & Views” and double-click on “Form” – the main application form.

– Click on Form properties

– In the “Event list”, select “OnLoad()” and click “Edit”

– Add the code in the attached CrmTranslatorCode.txt to this event editor, this consists of

  1. Tx_Selected() – the function which does the work
  2. Definition of the crmTranslator object to use as a namespace, and couple of lines to:
  •  
    • Attach the Tx_Selected() function to this namespace (as crmTranslator.TranslateText)
    • Attach the namespace to the window so that it is available when the button calls it.
//
// Tx_Selected, function where the work is done
//
//
Tx_Selected = function() 
{
   // Provide your own Application ID.
    var appId = "YOUR APP ID";
      var paramString = "http://api.microsofttranslator.com/V1/Http.svc/Translate?";
      paramString += "appId=";
      paramString += appId;
      paramString += "&from=en&to=es";

   // Get the text to be translated.
   var selectionObject = document.selection;
   if (selectionObject.type == 'Text') 
   {
      try
      {
          var selectedText = selectionObject.createRange();

         var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
         xmlhttp.open('POST', paramString, false);
         xmlhttp.setRequestHeader('Content-type','text/plain');
         var ret =   xmlhttp.send(selectedText .text);
         var msg = '<table border="1"><tr><td   WIDTH=450>';
         msg += xmlhttp.responseText;
         msg += '</td></tr></table>';
       }
      catch (e)
      {
          var msg = "<p>There was a problem with the Search</p>";
          if (e.number == -2146828218)
           {
               msg += "<p>Your Internet Explorer security settings ";
               msg += "for this zone do not allow ";
               msg += "access to data sources across domains. </p>";
               msg += "<p>You must set your Internet Explorer ";
               msg += "security settings to allow access ";
               msg += "to data sources across domains. ";
               msg += "For more information see ";
               msg += "<a href='http://www.microsoft.com/windows/ie/";
               msg += "ie6/using/howto/security/setup.mspx#EQCAC' ";
               msg += "Target='_blank' >Setting Up Security Zones";
               msg += "</a>.</p>";
           }
      }

      txWindow = window.open("", "mywindow","status = 0, scrollbars = 1, height = 200, width = 500,  resizable = 0");

      txWindow.document.write('<img src="/ISV/CRMTranslator/poweredby.gif" alt="" />');
      txWindow.document.write('<br/><br/>');

       //write the text to the window in a table
      txWindow.document.write(msg);
      txWindow.document.write('<br/><br/>');
      txWindow.focus(); 
    } //end of the 'if' block
}

//Create an arbitrary object to serve as a namespace
var crmTranslator= new Object();

//Attach the function to the crmTranslator
crmTranslator.TranslateText = Tx_Selected;

//Attach the crmTranslatorto the window so it is globally available
window.crmTranslator = crmTranslator;

 

– Ensure that the Event is enabled checkbox is checked and click “Ok”

– Click “Ok” on the “Form Properties” dialog also

– Save and Close your form

– You will, again, need to ‘publish’ this customization before it is usable.

The CRM SDK is available here http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=82e632a7-faf9-41e0-8ec1-a2662aae9dfb

You should find the crmsdk4.chm file which comes with a useful reference guide especially the sections like “Customization Best Practices”, “Accessing Web Services in Jscript” and “ISV.Config XML Reference”

For another code example and more information on the consumption of external web services from within a CRM form, see this blog post http://msdn.microsoft.com/en-us/library/cc150839.aspx

Setting the source and target languages

In the example given, the “from” parameter is set for English source text to be translated into Spanish:

(“from=en&to=es”). 
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      xmlhttp.open('POST', 'http://api.microsofttranslator.com/V1/Http.svc/Translate?appId=YourAppID&from=en&to=es', false);

To change the source/target languages you need to edit the form Onload () function to reflect the desired languages – for example, “from=de&to=fr” for German source text to be translated to French.

It is important that you use languages which are;

a) supported by the service, and

b) you must use the recognized ISO 639-1 language code:

            image

 

 

Using the “Translate” button

The example given here is in the Accounts form, but the process is the same for any entity.

– Navigate to “Workplace\Accounts” (or the entity you have included the function in)

– Open any record

– Select the text in any free text field or edit box, on any tab (in the example we’ve highlighted the “Description” text on the “Details” tab

                 clip_image006

– Click on the translation button in the toolbar.

                 clip_image008

– Microsoft Translator is invoked and the returned translation is displayed in a pop-up as follows (i.e.; the selected text is translated to Spanish)

                 clip_image010

Any and all use of the Microsoft Translator service must be in full compliance with the Live Services ‘Terms of Service’ (http://dev.live.com/terms/) and specifically the Microsoft Service Agreement here-http://help.live.com/help.aspx?project=tou&mkt=en-us.

For more information on the use of the MS translator see: http://msdn.microsoft.com/en-us/library/dd576287.aspx

Cheers,

Dermot Boyle

Simplify your life with JavistaCRM

CRM for iPhone

Download JavistaCRM on iPhone v1.5

Start your trial experience of JavistaCRM

FAQ concerning JavistaCRM

Question, Feedback or to be a partner

Update Rollup 8 for Microsoft Dynamics CRM 4.0

December 22, 2009 Leave a comment

The Microsoft Dynamics CRM Sustained Engineering team will release Microsoft Dynamics CRM 4.0 Update Rollup 8 on Thursday, December 17, 2009.

Once the release is available the links below will take you to the necessary information about Update Rollup 8.

General Details about Update Rollup 8

  • Update Rollup 8 is cumulative. However, the Update Rollup 8 CRM Client and Data Migration Client packages require Update Rollup 7 to be installed. For all other CRM components you do not need to install any previous Update Rollups prior to Update Rollup 8
  • The Update Rollup 8 download contains updates for the 40 supported Language Packs. Prior to installing the Update Rollup 8 Language pack you must install the original Language pack.
    • If you have Language Packs installed, you should
  1.  
    1.  
      1. Download the Update Rollup 8 Language Pack
      2. Install the Update Rollup 8 Language Pack
      3. De-provision the Language Pack
      4. Re-provision the Language Pack
  • Information about how to avoid reboots when installing the CRM Outlook Client can be found in the Update Rollup 4 blog posting.
  • The Update Rollup 8 Client can be deployed before the server is upgraded to Update Rollup 8.
  • Steps to make the Update Rollup 8 Client available via AutoUpdate can be found in the Update Rollup 4 blog posting. The Link and Patch IDs can be found in kb article 975995.

Microsoft Dynamics CRM E-mail Router

Update Rollup 8 adds support for Exchange 2010. However, the Update Rollup 8 Rule Deployment Wizard does not yet support Exchange 2010. We are working to add that support in future Update Rollups.

How to get support for Update Rollup 8

To get support please contact Microsoft Product Support. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site: http://support.microsoft.com/default.aspx?scid=fh;[LN];CNTACTMS

Note: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Cheers,

Matt Brown

Simplify your life with JavistaCRM

CRM for iPhone

Download JavistaCRM on iPhone v1.5

Start your trial experience of JavistaCRM

FAQ concerning JavistaCRM

Question, Feedback or to be a partner

Tips & Tricks: Displaying Contact Images in Microsoft Dynamics CRM

December 22, 2009 Leave a comment

Wouldn’t it be nice to see some pictures of your customer when you open the contact form?

clip_image002

These pictures could be stored as jpg-attachment in the notes of your contact:

clip_image004

The solution behind this is to create a little ASP.NET-web application which should be displayed in an IFrame in your contact form:

clip_image006

The tricky thing here is to get a one-column-sized IFrame. The solution is to replace the first section by a custom section with a “Fixed Field Width” Section Layout and a “Two Columns (1:1)” Column Format.

clip_image008

Now you can create the IFrame, which have to be linked to your web application:

clip_image010

In the Layout properties you see that you have a “One column” Layout.

clip_image012

But the most important thing is to create an ASP.NET web application with Visual Studio 2008 or Visual Web Developer 2008 Express Edition. Sorry, but in this context I cannot show you the basics, but if you are a little bit experienced with ASP.NET this should be no problem for you.

Create a Project with a name like “CrmExtensions” with the following files and the references to the files “microsoft.crm.sdk.dll” and “microsoft.crm.sdktypeproxy.dll” from the Microsoft Dynamics CRM 4.0 SDK.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowImageAttachments.aspx.cs" Inherits="CrmExtensions. ShowImageAttachments" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <asp:Panel ID="panelPictures" runat="server">

    </asp:Panel>

    </form>

</body>

</html>

ShowImageAttachments.aspx.cs:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using Microsoft.Crm.SdkTypeProxy;

using Microsoft.Crm.Sdk.Query;

using Microsoft.Crm.Sdk;

namespace CrmExtensions

{

    public partial class ShowImageAttachments : System.Web.UI.Page

    {

        CrmHelper myCrmHelper = new CrmHelper();

        protected void Page_Load(object sender, EventArgs e)

        {

            Guid id = Guid.Empty;

            int objecttypecode = 0;

            try

            {

                id = new Guid(Request.QueryString["id"]);

                objecttypecode = Int16.Parse(Request.QueryString["type"]);

            }

            catch 

            {

                // This can be the Guid of a contact with pictures you want to display for new contacts.

                id = new Guid("{2EE9EA21-B900-DD11-B6E8-001871E4CE73}");

                objecttypecode = 2;

            }

            ColumnSet columns = new ColumnSet(new string[] { "filesize", "filename" });

            List<DynamicEntity> annotations = myCrmHelper.GetDynamicEntities("annotation", new string[] { "objectid", "objecttypecode" }, new object[] { id, objecttypecode }, columns);

            List<Guid> annotationids = new List<Guid>();

            foreach (DynamicEntity annotation in annotations)

            {

                Guid annotationid = annotation.GetKeyValue();

                string filename = annotation.GetString("filename");

                int filesize = annotation.GetCrmNumberValue("filesize");

                // Only small jpg-files are allowed

                if (filename.ToLower().EndsWith("jpg") && filesize < 500000)

                {

                    string imageUrl = "ShowImageAttachment.aspx?id=" + annotationid.ToString();

                    // This is the download-URL to the file itself to get the original file instead of a smaller version.

                    string navigateUrl = "/ComBeck/Activities/Attachment/download.aspx?AttachmentType=5&AttachmentId=" + annotationid;

                    HyperLink hl = new HyperLink();

                    hl.ImageUrl = imageUrl;

                    hl.NavigateUrl = navigateUrl;

                    hl.Target = "_self";

                    hl.Text = filename + " (" + (filesize / 1000).ToString("#,##0") + " KB)";

                    hl.ToolTip = filename + " (" + (filesize / 1000).ToString("#,##0") + " KB)";

                    panelPictures.Controls.Add(hl);

                }

            }

        }

    }

}

ShowImageAttachment.aspx:

<%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”ShowImageAttachment.aspx.cs” Inherits=”CrmExtensions. ShowImageAttachment” %>

ShowImageAttachment.aspx.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Crm.SdkTypeProxy;
using Microsoft.Crm.Sdk.Query;

using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;

namespace CrmExtensions
{
    public partial class ShowImageAttachment : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            CrmHelper myCrmHelper = new CrmHelper();
            Guid annotationid = new Guid(Request.QueryString["id"]);
            CrmService crmService = myCrmHelper.GetCrmService();
            annotation crmAnnotation = (annotation)crmService.Retrieve("annotation", annotationid, new AllColumns());
            byte[] picture = System.Convert.FromBase64String(crmAnnotation.documentbody);
            System.IO.MemoryStream ms = new System.IO.MemoryStream(picture);
            System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(ms);
            int height = 150;
            int width = height * bmp.Width / bmp.Height;
            Response.ContentType = crmAnnotation.mimetype;
            if (bmp.Height > height)
            {
                System.Drawing.Image imgPhoto = System.Drawing.Image.FromStream(ms);
                System.Drawing.Bitmap bmPhoto = new System.Drawing.Bitmap(width, height, bmp.PixelFormat);
                bmPhoto.SetResolution(bmp.HorizontalResolution, bmp.VerticalResolution);
                Graphics grPhoto = Graphics.FromImage(bmPhoto);
                grPhoto.SmoothingMode = SmoothingMode.AntiAlias;
                grPhoto.InterpolationMode = InterpolationMode.HighQualityBicubic;
                grPhoto.PixelOffsetMode = PixelOffsetMode.HighQuality;
                grPhoto.DrawImage(imgPhoto, new Rectangle(0, 0, width, height), 0, 0, bmp.Width, bmp.Height, GraphicsUnit.Pixel);
                MemoryStream mm = new MemoryStream();
                bmPhoto.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
                imgPhoto.Dispose();
                bmPhoto.Dispose();
                grPhoto.Dispose();
            }
            else
            {
                bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
            }
            bmp.Dispose();
        }
    }
}

CrmHelper.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using System.Data;
using System.Data.SqlClient;
using System.Text;

using Microsoft.Crm.SdkTypeProxy;
using Microsoft.Crm.Sdk;
using Microsoft.Crm.Sdk.Query;
using Microsoft.Crm.SdkTypeProxy.Metadata;
using System.Collections;
using Microsoft.Crm.Sdk.Metadata;
using System.IO;

namespace CrmExtensions
{
    public partial class CrmHelper
    {

        public CrmService GetCrmService()
        {
            CrmAuthenticationToken token = new CrmAuthenticationToken();
            token.AuthenticationType = 0; //Active Directory
            token.OrganizationName = "ComBeck";
            CrmService service = new CrmService();
            service.Url = "http://crm/mscrmservices/2007/crmservice.asmx";
            service.UseDefaultCredentials = true;
            service.PreAuthenticate = true;
            service.CrmAuthenticationTokenValue = token;
            return service;
        }

        public List<DynamicEntity> GetDynamicEntities(string entityName, string[] attributes, object[] values, ColumnSetBase columns)
        {
            CrmService crmService = GetCrmService();
            RetrieveMultipleRequest rmRequest = new RetrieveMultipleRequest();
            QueryBase queryBase = null;
            if (attributes == null)
            {
                QueryExpression query = new QueryExpression();
                queryBase = query;
            }
            else
            {
                QueryByAttribute query = new QueryByAttribute();
                query.Attributes = attributes;
                query.Values = values;
                queryBase = query;
            }
            queryBase.EntityName = entityName;
            if (columns is AllColumns)
            {
                queryBase.ColumnSet = columns;
            }
            else if (columns is ColumnSet)
            {
                queryBase.ColumnSet = columns;
            }

            rmRequest.Query = queryBase;
            rmRequest.ReturnDynamicEntities = true;
            RetrieveMultipleResponse rmResponse = (RetrieveMultipleResponse)crmService.Execute(rmRequest);
            List<DynamicEntity> dynamicEntities = new List<DynamicEntity>();
            foreach (BusinessEntity be in rmResponse.BusinessEntityCollection.BusinessEntities)
            {
                dynamicEntities.Add((DynamicEntity)be);
            }
            return dynamicEntities;
        }
    }
}

This ASP.NET project has to be saved under the ISV subfolder of your CRM-folder like “C:\Inetpub\wwwroot\ISV\ComBeck”. The folder “ComBeck” has now to be configured in IIS as Application.

clip_image014

If you get a “MultipleOrganizationSoapHeaderAuthenticationProvider” exception please take care to register the file “Microsoft.Crm.WebServices.dll” from folder “C:\Inetpub\wwwroot\bin” in the Global Assembly Cache (GAC). Please do an iisreset after this.

If you have questions or need support just give me a mail (Juergen.Beck@combeck.de).

Have fun with my extension,

Jürgen Beck

Simplify your life with JavistaCRM

CRM for iPhone

Download JavistaCRM on iPhone v1.5

Start your trial experience of JavistaCRM

FAQ concerning JavistaCRM

Question, Feedback or to be a partner

Option for a “Quick Create” of CRM Records

December 22, 2009 1 comment

Back in the early Microsoft CRM days (remember those?), you had the option to ‘Quick Create’ a lead, contact or account. This was a native form that only included the required (and maybe the recommended fields, but can’t remember anymore!). This concept comes up from time to time with our customers who are sometimes need a simple and fast way to get records entered into the system.

Of course, we could custom develop a Web page for them, but another alternative could be to use the Mobile Express feature. As you know Mobile Express comes standard with your CRM installation assuming you are at least on UR6 or above, but can also be downloaded separately for those on UR5 or earlier. Mobile Express allows for a separate form configuration natively that can be customized specifically for mobile form entry. Now just take the resulting edit form URL, pop it into an ISV.Config button/menu, and viola a simple data entry form!

The URL would typically look like: https://[your specified domain]/[Organization]/m/ef.aspx?etn=[entity].

You can then specify the link either directly in the ISV.Config as a button or menu item, or even open using JavaScript to provide even more control of the resulting window. An example of each approach would resemble the following:

<Root>
  <MenuBar>
    <CustomMenus>
      <Menu>
        <Titles>
          <Title LCID="1033" Text="Quick Create Record" />
        </Titles>
        <MenuItem Url="https://[domain]/[org]/m/ef.aspx?etn=account">
          <Titles>
            <Title LCID="1033" Text="Account" />
          </Titles>
        </MenuItem>
        <MenuItem JavaScript="window.open('https://[domain]/[org]/m/ef.aspx?etn=account','','scrolling=yes,toolbar=no,status=yes,resizable=yes,menubar=no,location=no,height=400,width=300');">
          <Titles>
            <Title LCID="1033" Text="Account w/JS" />
          </Titles>
        </MenuItem>
      </Menu>
    </CustomMenus>
  </MenuBar>
</Root>

So, even if you aren’t exposing the Mobile Express Web pages to the Internet (i.e. your mobile device), you could leverage this approach as a simple and supported way for your users to get data into CRM via an alternative form interface

Cheers,

Jim Steger

Simplify your life with JavistaCRM

CRM for iPhone

Download JavistaCRM on iPhone v1.5

Start your trial experience of JavistaCRM

FAQ concerning JavistaCRM

Question, Feedback or to be a partner

Behavior Change in Cascading Assign for Microsoft Dynamics CRM 4.0

December 14, 2009 Leave a comment

The functionality in Cascading Assign has been changed in Microsoft Dynamics CRM 4.0, Update Rollup 8 or newer. As originally designed, only those objects meet the cascading rules can participate the cascading operation. For Cascading Assign, there are 4 rules:

  • Cascade All: all related objects can participate the cascading operation
  • Cascade User-Owned: only those related objects with the same owner as the parent’s can participate the cascading operation
  • Cascade Active: only those related objects in the active state can participate the cascading operation
  • Cascade None: no related objects can participate the cascading operation

When the primary object is to be assigned to the new owner, it will trigger the Cascading Assign to all the related objects in the cascading tree that meet the cascading rules. It will assign the new owner and revoke the inherited access right from the previous owner of the primary object (root) to all those objects.

This behavior (found in CRM version 4) has two issues regarding to the access rights inherited from the owner of the parent objects:

1. It only revokes the inherited access right from the previous owner of the primary object (root).

2. It only revokes the inherited access right to those related objects that meet the cascading rule.

Here are the user scenarios to illustrate the issues:

Scenario 1: Three objects created by different users.

  • The user U1 creates the account A
  • The user U2 creates the contact C
  • The user U3 creates the task T
  • Set A the parent customer to C
  • U1 is granted the inherited access right (IA1) to C via Reparent
  • Set C the regarding object to T
  • U1 & U2 are granted the inherited access rights (IA1 & IA2) to T via Reparent
  • Assign A the new owner U4

The result: All three objects are assigned to the new owner U4 and the inherited access right (IA1) from the previous owner of A (U1) are revoked for the child objects C and T. However, the inherited access right (IA2) from the previous owner of C (U2) is not revoked for T. Therefore, U2 still can access to T via IA2 after the Cascading Assign even though it is no longer the owner of C.

Scenario 2: Child object does not meet the cascading rule.

  • Set Account_Tasks relationship to Cascade All for Reparent, Cascade User-Owned for Assign (see the form below)
  • The user U1 creates the account A
  • The user U2 creates the task T
  • Set A the regarding object to T
  • U1 is granted the inherited access right (IA1) to T via Reparent
  • Assign A the new owner U3

The result: Because T has the different owner than A’s, the relationship with A does not meet the cascading rule (User-Owned). Therefore it is excluded from the Cascading Assign action. The inherited access right (IA1) from the previous owner of A (U1) stays and U1 still can access T via IA1 after the Cascading Assign even though it is no longer the owner of A.

clip_image001

New Behavior

With the CRM version 4 design change for Cascading Assign, all objects in the cascading tree will be collected and processed thusly:

  1. (new) All related objects in the cascading tree are collected including those objects do not meet the cascading rules.
  2. All related objects that meet the cascading rules will be assigned to the new owner of the primary object.
  3. (new) The inherited access rights from all previous owners of the reassigned parent objects will be revoked except those are still shared with the parent objects.

Please note the cascading rule will be broken for the sub-tree if the specific object does not meet the cascading rule with its parent object. All objects in the sub-tree will be treated as no-cascading no matter if the individual object meets the rule with its parent or not.

More Information

This change is available in CRM 4.0 Update Rollup 8 or newer. You can download it as part of the newest CRM Update Rollup.

For the inherited access rights left in your CRM system from the previous Cascading Assign there is an optional tool for you to fix the inherited access rights to the objects in organization wide or the specific cascading tree let by the specific object. Here is the usage of the tool in the command line:

Microsoft.Crm.SE.FixPOAForCascadeAssign.exe <OrgName> [<ObjectId > <ObjectTypeCode>]

For example:

Microsoft.Crm.SE.FixPOAForCascadeAssign.exe AdventureWorksCycle Microsoft.Crm.SE.FixPOAForCascadeAssign.exe AdventureWorksCycle 21315527-0C71-DB11-8F1D-0017A41F0DE7 1

Cheers,

Chris Xia

Simplify your life with JavistaCRM

CRM for iPhone

Download JavistaCRM on iPhone v1.5

Start your trial experience of JavistaCRM

FAQ concerning JavistaCRM

Question, Feedback or to be a partner

Data Wizard: Using field delimiters characters in data source files

December 10, 2009 1 comment

The enhanced Import Data wizard released in Microsoft Dynamics CRM Online November 2009 Service Update supports different formats of input source data file such as XML Spreadsheet 2003 (.xml), Comma-separated values (.csv), Text (.txt) and compressed files (.zip). For more information on supported file types, please visit:

http://blogs.msdn.com/crm/archive/2009/11/10/supported-file-types-in-data-import-wizard-for-microsoft-dynamics-crm-online.aspx

If input source data is in Text/CSV-formatted files then field and data delimiter characters play very important role in processing these files. The import wizard uses the field delimiter character to separate out different fields in the source file. The Data delimiter character is used to keep the field value intact if field delimiter character itself is a part of any field value. Let’s go through two examples to understand their functioning.

Example 1: Explaining a Field Delimiter

Consider a source input file which contains:

First Name, Last Name

A, B

Here the comma (,) character separates out the two fields ‘First Name and ‘Last Name’. So when we import the above file we need to specify which character should be used as the field delimiter. The wizard provides a dropdown option to select the field delimiter from supported set of values (See the Screenshot below). The supported values are

  • Commas (, )
  • Colons (: )
  • Semicolons (;)
  • Tabs (\t)

clip_image002

By default comma (,) is selected as the field delimiter.

 

Example 2: Explaining a Data Delimiter

If a field value in the Txt/CSV-formatted file contains a field delimiter character, such as a comma or a tab, or a new line character, we must place the field value between the data delimiter characters.

Let’s take another example of a source input file having content as following:

First Name, Last Name, Street Address, Description

Adam, Brothers, “Microsoft Campus, Hyderabad, AP”, “This

is a multi-line description

of the record”

In the above example, the data delimiter characters Double Quotes (“ “) are used to hold “Microsoft Campus, Hyderabad, AP” as single field value because comma(,) which is also the field delimiter character , is appearing twice in this field value “Microsoft Campus, Hyderabad, AP”.

Similarly in the Description field, Double Quote (“ “) is being used to hold a multi-line field value with new line characters. For the sake of clarity, we can place any field value between the data delimiter characters.

The new Import wizard also provides a dropdown of supported data delimiter characters (See the screenshot below). The supported values are

  • Double quotation marks (“ “)
  • Single double quotation marks (‘)
  • None

clip_image004

By default double quotation marks (“ “) is selected as the data delimiter.

Single Column Detection

If the file contains only one field or if we select a field delimiter which is not compatible with our source file then the new import wizard smartly detects this and shows us the warning message. In the above example, if we choose semicolon (:) instead of comma (,) as field delimiter then the import wizard shows the following message as

clip_image005

If we press OK and go ahead to perform mapping then on ‘Map Fields’ screen we get single value in source fields selectors as shown below.

clip_image007

So the selection of appropriate field and data delimiters is of paramount concern for correct interpretation of source input files.

Thanks,

Priyesh Suman

Simplify your life with JavistaCRM

CRM for iPhone

Download JavistaCRM on iPhone v1.5

Start your trial experience of JavistaCRM

FAQ concerning JavistaCRM

Question, Feedback or to be a partner