rosslotharius.com

The blog of Ross Lotharius.

January 2008 - Posts

Configuring the CRM 4 Email Router for Exchange

Today Michael Lu posted a video (here) on configuring the Email Router for Exchange.  Here is a blurb from his post:

Today, I explore another one of the new features of CRM 4.0: the ability to connect directly to an individual’s Exchange mailbox. This means that you don’t have to deal with forward mailboxes and rule deployment to do e-mail integration. It also means you won’t have to deal with the hassle of coordinating multiple IT departments and having them sign off on your architecture. :)

http://video.mikelu.org/emailrouterexchange/emailrouterexchange.html

CRM 4 Sdk 4.0.1 Released

 Amy Langlois posted today (Microsoft Dynamics CRM Team Blog) that the CRM 4 Sdk has been updated.  Here is an excerpt from her post about the updates:

 

1) The Plug-in walk through in the SDK has been updated to match the readme that is included in the SDK\Walkthroughs folder.

2) The Readme file in the SDK\tools\deployworkflowtool folder has been corrected.

3) Additional sample code has been added in the Scripting Sample Code topic.

4) New content has been added to the URL Addressable Forms topic.

You can download it here

Configuring the CRM 4 Email Router with POP3

Michael Lu posted on his blog a video on how to configure CRM 4 to work with a Gmail account.  If you don't know how to configure the Email Router, I suggest checking it out.  Here is an excerpt from his post here 

With CRM 4.0 off and running now, I’ve been seeing a lot of questions on how to get the E-mail Router to work with POP3 mail access. I’ve recorded a video of how you can take a Gmail mailbox and hook it up to a Queue inside of CRM via the E-mail Router.

Enjoy! Next video…using the E-mail Router with an individual Exchange mailbox!

http://video.mikelu.org/emailrouterpop3/emailrouterpop3.html

Citrix Support Announced for CRM 4

Check out the announcement on Citrix's website here

"Microsoft Dynamics CRM 4.0 is compatible with Citrix Presentation Server 4.5 (32 & 64 bit)."

Posted: Jan 22 2008, 02:15 PM by Ross | with no comments
Filed under: ,
Utilizing the Manager and Hierarchical Security in CRM

Lately we have had a few clients ask for a more hierarchical structure for their User management.  For example, a Sales Rep has a Regional Director, who has an Area Director, who has an Area VP, etc.  Normally in CRM we would use Roles in combination with Business Units to handle these permissions.  But what if the client needs to know this structure?  What if they need to know that Jane Doe is John Doe’s Director?  What if a Director resides in 1 Business Unit but has a subordinate in another Business Unit?  Currently in CRM, the roles are flat.  There is no hierarchy.  Business Units help with permissions but can lock you into very rigid structures.  So how do we do it?

When I first started using CRM 3, I noticed that the Users had a Manager field, but it was always disabled.  I never knew how to edit this field and over the last year or so, have not had to.

Where do I edit the Manager?

The Manager field is enabled when you first add a User to CRM. After you save the User, the Manager is disabled. This functionality is similar to the Business Unit field.

To edit the Business Unit I knew that you do that through More Actions on the grid view of the Users. So I went there first to see if I could edit the Manager. Sure enough, there was the option to “Change Manager”.

image

What does the Manager do?

Setting the Manager field gives the hierarchy we need, but does it also give the permissions we need?  Can a Manager automatically see entities the subordinate owns?

Getting the Manager field is very simple.  Through the Sdk, the Manager is available through the systemuser.parentsystemuserid property.  Through Filtered Views you can get the Manager’s Id by querying the FilteredSystemUser and returning the parentsystemuserid field.  Filtered Views also return the parentsystemuseridname as well.  Using either of these methods, we can create a recursive function that will return the Manager of a User and the Manager of that Manager etc.  Below is a very basic example:

 

protected void searchButton_Click(object sender, EventArgs e)

{

    CrmService service = new CrmService();

    service.Credentials = System.Net.CredentialCache.DefaultCredentials;

 

    //Pass in the User who's hierarchy you want to get

    GetManager(new Guid("d01f2501-efb2-db11-ab88-0003ff5681c4"), service);

}

 

private void GetManager(Guid userId, CrmService service)

{

    ColumnSet cols = new ColumnSet();

    cols.Attributes = new string[] { "systemuserid", "parentsystemuserid", "fullname" };

 

    //Get the User

    systemuser user = (systemuser)service.Retrieve("systemuser", userId, cols);

 

    if (user.parentsystemuserid != null)

    {

        //User has a Manager

        GetManager(user.parentsystemuserid.Value, service);

    }

    else

    {

        //The boss

    }

}

Why use the Manager field?

The next thing I wanted to check was to see if CRM automatically gave the Manager permission to the subordinate’s entities they owned.  This did not happen.  We can however easily achieve this by sharing the entity to the User’s Manager.  Using a post callout we can check to see if the Owner has changed.  If the Owner changed, use the same recursive function above to share the entity to the Manager on up.  Using this, we can now achieve the permissions we need without needing the rigid and very limited Business Units + Roles model.

Using the Manager field in combination with Business Units, Roles, and sharing truly opens the door to a  much more flexible security model than CRM offers out of the box.  This example was a very basic example to illustrate how useful the Manager field can be to achieve an actual hierarchy with CRM.

Posted: Jan 17 2008, 01:11 AM by Ross | with no comments
Filed under: ,
Bug or By Design? CRM 4 Mail Merge Templates and Sharing

One of the great features that came with CRM 4 is the ability to upload new mail merge templates to CRM.  CRM 4 also introduced the ability to actually do the mail merge via the web client as well.  In CRM 3, you had to install the desktop client to the get the mail merge templates and could only do mail merging through the outlook client.  Adding of new templates could only be done on the local client as well because the templates were stored locally.

One thing that many clients ask for is that mail merge templates only be available to certain groups of their organization.  They don't want Fred in HR to see Sales templates and they don't want Bob in Sales to see HR templates.  There are multitude of reasons why, but the main reason is clutter.  HR might have 50 templates and Sales might have 50 templates.  This amount of templates will cause confusion and be annoying to users who are using the system daily.  CRM handles this with most entities by offering sharing and Templates are no exception.

Since adding templates is a new feature with CRM 4, let me quickly walk through adding a new template.

To add templates simply go into the Settings > Templates and choose the template you want to add: 

After choosing a template (my example will use Mail Merge Templates), you will see a grid that displays your templates and all templates in the system.  Clicking on New will take you to the screen below:

 

 

By default new templates are saved with the Ownership of Individual.  This means that only the creator can see the template.  You can modify this to Organization through the Actions menu (displayed below) or the More Actions on the grid view and that will make the template available to everyone.  

If you look at the screenshot to the right, you will see Sharing....  Sharing is the same as CRM 3 so I will skip over those details.

 

Now I have added a template but how do I meet the requirement that I outlined above of only certain people seeing certain templates?  I assumed this would be as simple as creating a template with the ownership set to Individual and sharing the template to Teams or other users.  So I went ahead and did this but was a little concerned because the screen that you use to actually use a template specifically states Personal or Organization.

After adding the appropriate sharing, I expected to see the mail merge template in the Personal list.  I was wrong.  It didn't appear in the list and it only showed my personal templates.  I then checked the Organization list and it wasn't there either.  I was stumped.  I shared this template but no one can see it.  I checked the filtered view and it showed up there, so I know the sharing is working but the UI isn't displaying it.  So I'm left scratching my head and wondering is this a bug or by design?

I have posted this issue up on the Microsoft newsgroup in hopes of it getting resolved.  If you agree, please mark "Agree" on the post located here

As it stands now, I think I'm going to have to build a custom lookup to get the functionality I need.  I really hope there is a better alternative and if you no one, drop me an email or respond here. 

Posted: Jan 13 2008, 03:50 PM by Ross | with 1 comment(s)
Filed under: , , ,
CRM 4 and Deploying Custom Code

I’ve had this question come up quite a few times since the release.  So for anyone wondering how to deploy custom code in CRM 4 in a supported fashion, here it is taken directly from the Sdk documentation:

Where Should You Put Custom Code?

You should use the following guidelines for your custom code:

  • Create a subfolder in the <serverroot>\ISV folder and put your ASPX files there.
  • Use a Microsoft Visual Studio Web Deployment project to separate your ASPX files from your DLLs.
  • Place your DLLs in the global assembly cache (GAC).
  • Use a web.config file in your folder to reference the DLLs that you placed in the GAC. Do not modify the Microsoft Dynamics CRM web.config file.  

For more information on installing an assembly into the GAC, check out the KB article here
 

Posted: Jan 11 2008, 01:12 PM by Ross | with 2 comment(s)
Filed under: , ,
CRM 4 Sdk Released

Download it here: download
 

Posted: Jan 11 2008, 01:06 PM by Ross | with no comments
Filed under: ,
CRM 4 Released with 90 day Trial Versions

Download today and try it out!

Download

 

Posted: Jan 11 2008, 01:02 PM by Ross | with no comments
Filed under: