Welcome to MSDN Blogs Sign in | Join | Help

Vote: 24 Hours to Build an xRM Application, You Decide on the Application, We Build it

Next week WPC 2009 begins in New Orleans. In between sessions and meetings we’ll post updates from the show. If you’re not going you can still participate and here’s how: starting on Monday at 4:30 PM CDT Reuben Krippner, Nikhil Hasija, Bryan Nielson and I will have 24 hours to build an xRM application and you can tell us what the “x” should be.

To vote on an application, choose your favorite from the links below, follow the link to Twitter (sign in if necessary) and reply to the message.

Emergency Response Management

Sports Team Management

Innovation Management

Secret Society Membership Management

Band Management

Golf Course Management 

Reply to A Twitter Post 

You can follow us @msdynamicscrm on Twitter as we build the application. On Tuesday afternoon we’ll put the finishing touches on the application live on stage.

So what is the x in xRM? You decide.

Barry Givens

Product Release: Mobile Express for Microsoft Dynamics CRM 4.0

We are pleased to announce the availability of Mobile Express for Microsoft Dynamics CRM 4.0. Mobile Express gives organizations a Microsoft supported mobile solution with the power of choice: choices in the devices and in the networks they use when going mobile.

This month, Bill Band of Forrester Consulting reported that 73% of companies with mobile CRM deployments recognized that mobile CRM improved employee productivity.  But too many organizations have not yet taken their customer facing personnel mobile. Sometimes this is due to perceived cost or complexity or lack of device standardization. Because we want all of our customers to gain the advantages that a mobile CRM solution provides, Mobile Express is available with no additional fees, is deeply integrated with the security and customization tools in Microsoft Dynamics CRM 4.0 and runs on virtually any device that can display HTML 4.0.  With Mobile Express, users can experience increased productivity while on the road and system administrators can enjoy a fast deployment with no need to update and deploy device software.

Mobile Express for Microsoft Dynamics CRM 4.0 is available as a free download and supports the product's  full customization and multi tenant capabilities. Those capabilities allow organizations to deploy a CRM solution for one set of workers and, using the same software licenses and hardware,  develop instantly mobilized xRM solutions for a wide variety of other business needs using point and click tools.

Enough chatter though. Follow the link above, read the fine print and download Mobile Express. Look for details on the Mobile Express for Microsoft Dynamics CRM roadmap in the next Statement of Direction coming next week.

 

Mobile Express for Microsoft Dynamics CRM 4.0 as seen from the HTC Touch Pro running Internet Explorer. You didn't think I was going to show screen shots of it running on an iPhone did you?

Customization tools are embedded within the application and use the same user roles you already have to provide role based experiences on the device.

I'll see you on the road (wth Mobile Express, of course),

Barry Givens

Posted by crmblog | 0 Comments
Filed under: , ,

Attachment(s): 03.jpg

Making Your Existing Email Address Your Windows Live ID

Let’s say you want to invite your new users to CRM Online using their corporate email address, however you are not sure if their corporate email address is their Windows Live ID (WLID).  Why would I do this?  Well if you send the invite to a Windows Live account (like @live.com or @hotmail.com) the invitation will be delivered to that Hotmail account and they may not monitor it regularly, thus thinking they did not receive an invite or being unaware that they were invited.  The easiest way to ensure your users get their invite successfully is to instruct them to associate their corporate email address to WLID.  The following process illustrates exactly how to do this.

  1. Invite the user using their corporate email address.
  2. When the user receives the email address, click on the link to accept the invitation.
    User email invitation
  3. Click on Get a Windows Live ID
    WLID Sign In
  4. Enter your corporate email address and designate a password (this DOES NOT have to be your email providers password, rather you are setting a password for the new WLID), security question and enter the captcha phrase, click Continue
    WLID Sign Up

You now have associated your corporate email address to a WLID and will be able to successfully accept the CRM invitation by logging in with this newly created WLID email address and password.

Cheers,

Eric Boocock

Rolling with the System Administrator Role

I recently had a customer that wanted to run the Email Router as a user other than the System Administrator, offhand this seemed like an easy task.  The customer setup a new “Service User” and created a special “Service Role” that only had access to email related privileges.  Here is what the Implementation Guide says:

“If you did not specify an incoming e-mail server during Microsoft Dynamics CRM Server Setup, you must manually add the service account running the E-mail Router service to the PrivUserGroup security group. The PrivUserGroup is created during Microsoft Dynamics CRM Server Setup. For steps on how to add members to this group, see the "Troubleshooting" section later in this section.”

The trick was that they did not want to add this user to the PrivUserGroup, but instead wanted to have this user be relatively low privilege. Unfortunately, this was not straightforward so I had to do some digging.  First thing I did was to enable CRM tracing to work through all the failed “Privilege Checks”, adding the needed privilege to the service role on after another.  Unfortunately, after we added all the privileges we ended up with this error:

MessageProcessor fail to process message 'GetDecryptionKey' for 'email'.

[2009-06-04 00:33:21.0] Process: w3wp |Organization:6f10d233-a921-4185-a303-7ae7d2fcffbc |Thread:    9 |Category: Platform.Sdk |User: 25d8907f-f84a-de11-80a2-00110aa06f20 |Level: Error | CompositeSoapExtensionExceptionHandler.Handle

CrmSoapExtension detected CrmException:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmException: Access is denied.

at Microsoft.Crm.ObjectModel.EmailService.GetDecryptionKey(ExecutionContext context)

This obviously required a little more digging.  That digging determined that CRM actually requires this user to have System Administrator role.  We granted the user this role and all was well.  But why was this required and is there anything we can learn from this?  The answer is “of course”, so read on. J

The System Administrator role in Microsoft Dynamics CRM is “special”, which is to be expected as it is basically the root security role that is granted to the setup user and users that have total access to things within the system.  Grant a user this role, make them a Deployment Administrator, and give them the corresponding required AD permissions and the user has total control over the CRM system.  But for today, I want to focus on the System Administrator Role and provide a bit of details behind it, some obvious and some not so obvious.

First, what is the System Administrator role?  Well obviously it is the role with the name System Administrator, but let’s be more specific.  If you create a new role via the Role Editor and grant it all privileges and call it “System Administrator” it will just be a role with a lot of privileges, but it won’t be the System Administrator role.  Here is why.  To CRM, the System Administrator Role is any role whose Role Template ID is that of the known System Administrator Role Template.  The GUID (627090FF-40A3-4053-8790-584EDC5BE201) of this template is well known and the template is created when you install CRM.

Now let’s take a look at the difference between the privileges of the role you created with “everything”.  We will use the following query:

-- Set these to the two roles you are trying to compare

-- This script is provided “AS IS” with no warranties, and confers no rights

DECLARE @SystemAdminRoleId uniqueidentifier

DECLARE @EverythingAdminRoleId uniqueidentifier

SET @SystemAdminRoleId = '66b89fc2-64b2-dc11-b25e-0003ffb8057d'

SET @EverythingAdminRoleId = '7057625a-4f6a-de11-bfd3-0003ff6e9d4e'

SELECT pb.privilegeid, pb.name FROM

       RolePrivileges rp JOIN PrivilegeBase pb ON rp.privilegeId = pb.privilegeid

       WHERE RoleId = @SystemAdminRoleId

       AND rp.PrivilegeId NOT IN (SELECT privilegeid FROM RolePrivileges WHERE Roleid = @EverythingAdminRoleId)

       ORDER BY [name]

Here is a list of privileges that are missing from the “everything” role:

Privilege ID

Privilege Name

25523F7C-7B1D-4844-8D2D-50767D6FAA94

prvAppendAsyncOperation

78969DB5-5F70-4782-8299-F9258E4449C8

prvAppendAttributeMap

26B5FDB2-1C17-478B-B448-EB66AFA82AD0

prvAppendBusinessTask

CF716BA0-04E5-4438-AE87-0B8729CC5219

prvAppendBusinessUnit

7D827946-147E-4292-A385-CCB34DC96525

prvAppendQueue

84B19140-92BB-4341-BED1-2AC5E0B1DD38

prvAppendToAttributeMap

FCD88D2B-7C3F-4FDA-8CF7-AD9AD27A4A32

prvAppendToBusinessTask

2055B892-9068-4B43-854E-814671E53E8C

prvAppendToEntityMap

E7753B34-17F3-400E-8396-88E24B8DC519

prvAppendToOrganization

28C3A786-82A5-4FF6-8D54-4876DB4BA2F8

prvAssignManager

B75A726F-E7AA-44AE-9282-F8776D913BBB

prvBulkDelete

B22E57F2-9D2E-4FAB-9667-F351133AB035

prvCreateApplicationFile

EBA97FF0-C3E4-47E2-A064-84ACD680092F

prvCreateAsyncOperation

EE9C4874-14A6-4F47-B72D-F6AACC65C554

prvCreateAttributeMap

AC1C8A42-C63B-4908-9988-F3CEB23CC50F

prvCreateBusinessTask

30713160-C5ED-43C2-9B66-5923CD7236B1

prvCreateCustomization

03FA6BCF-30F3-4C07-88C3-5B02E5713701

prvCreateEntityMap

9E931DB8-975F-4DBD-BEFD-9244895D49B8

prvCreateOrganization

01750F14-3320-49CC-A7D1-52502CDCD16D

prvCreateOrgEmailTemplates

C81A03BB-4BFC-45A6-9184-E899CE26811A

prvCreatePluginAssembly

592CB518-880D-492F-BD3C-3558413B8CED

prvCreatePluginType

303DEF1C-947C-4AF3-A63B-406A7ABC72DE

prvCreateSdkMessage

998329E9-5CE5-4538-99B1-983191899A8B

prvCreateSdkMessageProcessingStep

65171D1B-1581-4FBB-96A3-95D14B5723CB

prvCreateSdkMessageProcessingStepImage

1BD35330-06E3-4495-8C8D-BAABF5F0208A

prvCreateSdkMessageProcessingStepSecureConfig

9BAEF8E0-76F8-42AA-8D48-DA0582A0D7E7

prvCreateWebWizard

FC0435ED-332A-459C-B1DD-4D037A560E94

prvCreateWizardAccessPrivilege

DC2393EA-4536-4DA0-8BD3-A02DF9CDB3E6

prvCreateWizardPage

60540CB9-61E0-49F4-BEDA-65E65F26CC3C

prvDebug

2CB0B47F-0BC8-44B6-9D62-838B31CA44B8

prvDeleteApplicationFile

D0F7B7C2-8891-400D-B6EC-848603001D0C

prvDeleteAttributeMap

B43C0E6E-0CF2-4D2F-BDEB-0E3FCB663690

prvDeleteBusinessTask

648BE51F-6EB2-4660-A564-A5FB555406A0

prvDeleteBusinessUnit

10B166F6-2F94-42DE-8049-1462D23A0E62

prvDeleteCustomization

24B20DD9-F2D7-4ECF-865D-F4CBF82C1A92

prvDeleteEntityMap

9A48030C-0AA6-434E-8DE5-C8EAB10D7E8A

prvDeleteOrganization

3FA24EFF-E413-4224-8CF2-BD29193F8ADF

prvDeletePluginAssembly

5E1C5422-9A12-4D3E-9960-51A812A005E2

prvDeletePluginType

8F9B0745-2842-45B6-A306-EAB47F138C7A

prvDeleteSdkMessage

25CA2AFD-E85D-4A14-BB81-C368CD59BF5B

prvDeleteSdkMessageProcessingStep

5EBF516C-E769-47DF-AD46-458B4B23603F

prvDeleteSdkMessageProcessingStepImage

E63E21E5-C2AF-4807-B5CA-78F257FC007F

prvDeleteSdkMessageProcessingStepSecureConfig

A3AC3B6F-6D09-4230-9221-C8B9AB0ABF06

prvDeleteTeam

820A33EB-A459-4B55-BA3E-4EC3F5B691BE

prvDeleteUser

EEBF0DDC-D4F3-4F22-A19A-A158868D3FA6

prvDeleteWebWizard

17A5FE9C-5981-48FB-81DB-F896BF113D15

prvDeleteWizardAccessPrivilege

828BD698-5B7D-47E4-A53D-5551CE989A7A

prvDeleteWizardPage

D48CF22F-F8C2-4E16-89EB-49F8281DE4EA

prvOverrideCreatedOnCreatedBy

5A9F6284-E81F-4294-9C63-D68052189B87

prvPublishDuplicateRule

AC3CC10E-F735-4F34-95E4-097EC2AB478B

prvPublishOrgMailMergeTemplate

7497D08B-CB4C-49AE-A1F0-47F21CACA6B8

prvPublishOrgReport

6C835796-0A87-4790-A6BA-E72651427EC1

prvPublishRSReport

E499D375-C305-4A8B-8C5B-4539AC212F77

prvReadBusinessTask

A629BCA1-FEFB-4B4C-A4E2-3401EFF833D4

prvReadSdkMessageProcessingStepSecureConfig

E6672D30-ED9E-4A1D-847D-7B1D05CD12E2

prvReparentTeam

B367742D-E25D-4223-8691-E055BCBE3D98

prvShareAsyncOperation

B3A3672D-2B04-4D65-87D9-217EC86BC1D0

prvWriteApplicationFile

F96E1B75-8A54-4EAC-823B-AE6F1CA465EF

prvWriteAttributeMap

40066203-C76A-4A58-9A89-F9D7B0D1E08D

prvWriteBusinessTask

F435A3D6-E4A2-4212-81D4-919DF326C95E

prvWriteEntityMap

37009C66-2E53-49F0-B857-62252EAA6412

prvWritePluginAssembly

C70843E8-D617-4873-9D05-8A8D4A68EE58

prvWritePluginType

6EBC7C4C-FDE7-424C-842E-11651498A9B3

prvWriteSdkMessage

072AEE35-581D-4488-85B1-AF09926FDA70

prvWriteSdkMessageProcessingStep

11954A66-B7AD-4DD9-B845-225D1B4C9FFE

prvWriteSdkMessageProcessingStepImage

51AA61B6-C2F7-4BD7-BE1E-5EA0F3AF463F

prvWriteSdkMessageProcessingStepSecureConfig

AFA371AC-1D2C-4B43-8026-A2055683E2D0

prvWriteWebWizard

32CAC4BD-93BA-4DB0-B3D8-7B2A96ADFF52

prvWriteWizardAccessPrivilege

4E016DC5-719E-4F11-ABAA-3A131A3B18A2

prvWriteWizardPage

As you can see, there are 69 missing privileges from your “everything” role.

Why is there a difference?  Well, this is because the CRM Role Editor UI does not allow you to set every privilege.

clip_image001

To get around this you should use the “Copy Role” feature to make an exact copy of the role.
clip_image003

So what if you manually (via the platform) add all the missing privileges to your role?  Unfortunately for some scenarios, this still isn’t good enough.  In CRM, there are some very specialized messages like GetDecryptionKey that actually have a check to see if the user has the System Administrator role:

if (service.IsSystemAdministratorRole(guid, context))
{
     flag = true;
     break;
}

Here is a breakdown of what worked and what did not:

Test

Result

Add ascentiumtest\routerService to PrivUserGroup

PASS

Remove ascentiumtest\routerService from PrivUserGroup

FAIL

Add CRM role of “System Administrator” to ascentiumtest\routerService

PASS

Remove “System Administrator” Role and add “Copy of System Administrator” Role to ascentiumtest\routerService

FAIL

Add ascentiumtest\routerService back to PrivUserGroup with “Copy of System Administrator Role

PASS

This message is used by the Email Router Service and as such, the account that the email router is running as must have the System Administrator role.  Unfortunately, there is no supported way around this, as even making a “copy” of the System Administrator role via the UI does not yield the desired results as the Template ID of the copied role is NULL.  You also can’t set the Role Template ID in a supported manner either as this attribute is marked as not valid for CREATE or UPDATE. The only other operation I could find that appears to require the System Administrator role is registering your CRM installation.

Special thanks to James Dulin and Ross Lotharius for helping with some background research on this post.

Cheers,

CRM MVP Aaron Elder

Which Database Hotfixes Did I Just Install?

This article will cover how to answer:

  • Which database hotfixes are currently installed on your Microsoft Dynamics CRM Server?
  • Which database hotfixes will be installed or uninstalled with a particular hotfix or Update Rollup (UR)?

Background

Historically, database hotfixes have been considered an internal detail of Microsoft Dynamics CRM hotfixes, so there is currently no straightforward way for administrators to track exactly when particular database hotfixes are installed or uninstalled.  There has been an increased interest in being able to track this information.  This article is intended to describe a workaround for deriving this information until a more formal means is available, most likely in CRM 5.0 timeframe.

All database hotfixes are cumulative.  Each new database hotfix will include all previously released database hotfixes as dependencies.  If a particular dependent database hotfix is already installed on your Server, it will not be reinstalled.  If a particular database hotfix is a dependency of other currently installed hotfixes, uninstall of the dependent hotfix will be a no-op.  It will be uninstalled when all other hotfixes that are dependent on it are also uninstalled.

No database hotfixes are installed when Microsoft Dynamics CRM Server is installed using the “Update installation files (strongly recommended)” option.  No database hotfixes are installed when a new organization database is created.  You must re-install database hotfixes for the new organization.

How to Track Database Hotfixes

You will need to know the KB numbers of the fixes you have already installed.  You can find this information in Add/Remove Programs.  For all of our examples, we will suppose that you have already installed the following:

  • KB949069
  • KB956129
  • KB955482

Example 1

Before installing Update Rollup 4 (KB968176), you want to know which database hotfixes will be installed along with it.

    1. Download the UR 4 package and save it to your computer
    2. Extract the UR 4 package
      1. Click Start –> Command Prompt
      2. In the command prompt window type ‘<dir>\ CRMv4.0-KB968176-i386-Server-ENU.exe /X’, where <dir> is the location where you saved the UR 4 package and hit ENTER.
      3. In the “Choose Directory For Extracted Files” dialog enter the directory where you would like to save the extracted files; if it does not exist already, it will be created. Click OK.
    3. Find database hotfix install info in the extracted package
      1. In Windows Explorer, navigate to the directory where you saved the extracted files
      2. Open the language specific folder such as ‘EN’ for English
      3. Open the file dbhotfix_install.xml.  Do not modify this file, or any of the contents of the extracted package.

        UR 4’s dbhotfix_install.xml looks like this:

<releases>

<release version="04.00.7333.1027" progress_range="20" location="KB948172\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1028" progress_range="20" location="KB948588\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1029" progress_range="20" location="KB951300\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1030" progress_range="20" location="KB950229\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1050" progress_range="20" location="KB952149\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1095" progress_range="20" location="KB956129\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1200" progress_range="20" location="KB953905\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1205" progress_range="20" location="KB954640\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1213" progress_range="20" location="KB957788\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1225" progress_range="20" location="KB949202\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1233" progress_range="20" location="KB957589\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1235" progress_range="20" location="KB955482\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1246" progress_range="20" location="KB956445\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1254" progress_range="20" location="KB960249\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1255" progress_range="20" location="KB949069\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1316" progress_range="20" location="KB959419\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1408" progress_range="20" location="KB961768\Install\DbHotfix_release.xml" />

<release version="04.00.7333.1551" progress_range="20" location="KB968176\Install\DbHotfix_release.xml" />

</releases>

Each entry is a database hotfix - for ease of reading, I have highlighted the ones installed in our example. 

  • The location attribute indicates the KB number
  • The version attribute indicates the build number

Your server’s current build number will be the greatest version of all the hotfixes you have previously installed.  So in our example, your current build number is 04.00.7333.1255.

When you install a new hotfix, any entry with a version greater than your current build number will also be installed.  Any entry with a version less than or equal to your current build number is already installed, and will not be installed again.  So in the case of our example:

  • What is currently installed?
    • Every entry up to and including 04.00.7333.1255 (KB949069).
  • What will be installed when you install UR 4?
    • Every entry greater than 04.00.7333.1255, so in this case the last three entries: KB959419, KB961768 and KB968176.

Example 2

You want to uninstall KB949069.

We will uninstall as far back as the next greatest version number.  So in our example, that means we will go back to 04.00.7333.1235 (KB955482).  So KB949069, KB960249, and KB956445 will be uninstalled.

Example 3

You want to uninstall KB955482.

If you uninstall a database hotfix that has a version less than your current build number, it will not actually be uninstalled until you uninstall all hotfixes with a greater version number.  So when you uninstall KB955482, it will not be uninstalled until you also uninstall KB949069.

Example 4

You want to install or uninstall a KB that is not listed in dbhotfix_install.xml

If you have a KB that is not listed in this file, this is because no new database hotfix was released with it.  You can still derive database hotfix tracking information by using the build number of that hotfix. You can find the build number in the KB article.

Thanks,
Leslie Zavisca

Posted by crmblog | 0 Comments
Filed under: ,

RELEASE - White Paper v2: Optimizing and Maintaining Microsoft Dynamics CRM 4.0

The MS CRM E2 team is pleased to announce the release of the version 2.0 update of the white paper Optimizing and Maintaining Microsoft Dynamics CRM 4.0, which is available from Microsoft Downloads at
https://www.microsoft.com/downloads/details.aspx?FamilyID=ba826cee-eddf-4d6e-842d-27fd654ed893&displayLang=en

Working with resources from Microsoft Premier Field Engineering, Microsoft SQL Server, UK MCS, and CRM Performance and UA teams, this update reflects the latest information available to assist readers with optimizing and maintaining the performance of Microsoft Dynamics CRM 4.0 implementations.

The following list provides a summary of the changes included with this version 2.0 update:

  • Updated hardware requirements for:
    • Microsoft Dynamics CRM 4.0
    • Microsoft Dynamics CRM 4.0 for Outlook
  • Categorized references/links to external content to by product version where appropriate (e.g. Windows Server 2003 and Windows Server 2008), and provided additional references where available
  • In the section Optimizing and Maintaining Internet Information Services, added the topic Optimizing the Performance of Integrated Windows Authentication and Kerberos Authentication
  • In the section Optimizing the Performance of Microsoft Dynamics CRM:
  • In the topic Enhancing Performance by Distributing Server Roles, added the sub-topic Considerations for Distributing Server Roles
  • In the topic Optimizing the Performance of Microsoft Dynamics CRM 4.0 Applications, in the sub-topic Optimizing the Performance of Microsoft Dynamics CRM Customizations, supplemented the information on disabling auto-complete on lookups with procedural information
    • In the section Optimizing Workflow, added multiple best practices.
    • In the section Optimizing and Maintaining Microsoft SQL Server and the Microsoft Dynamics CRM Database:
  • Added note about and reference to white paper Improving Microsoft Dynamics CRM Performance and Securing Data with Microsoft SQL Server 2008
  • In the topic Optimizing and Maintaining Query Performance, added the sub-topic Enhancing the Performance of the Display of Query Results
  • In the topic Optimizing and Maintaining the Microsoft Dynamics CRM Database, added the sub-topic Implementing Solid State Drive Technology
    • Added Appendix B: CRM Performance Counters; created Appendix C: CRM E-mail Router Performance Counters for previously published Appendix B content; added Appendix D: Summary of Changes in v2.0 Update

Cheers,

Jim Toland

Monitoring Queue Data with the CRM Queue Gadget

If you are looking for a convenient way to monitor queues, be sure to read our new article on  MSDN,  Monitoring Microsoft Dynamics CRM 4.0 Queues with a Windows Sidebar Gadget. It shows you how to use Windows Sidebar, also known as “gadgets”, to monitor the information in Microsoft Dynamics CRM queues. The CRM Queue Gadget application lets you view queue data in a small lockable panel on your Windows Vista desktop. It looks like this:

clip_image002

The article is based on the sample application and the blog that were written by Ake Janedittakarn, a software development engineer on the CRM team. Since the publishing of the blog, Ake moved to Thailand and now works on a different team at Microsoft. You can read Ake’s original blog here: http://blogs.msdn.com/akezyt/archive/2007/08/03/crm-queue-gadget.aspx.

Cheers,

Inna Agranov

Posted by crmblog | 0 Comments
Filed under: , ,

New Silverlight 2 Sample on Code Gallery

I recently did an investigation into using Silverlight 2 with Microsoft CRM 4.0. I have posted the resulting project and supporting documentation on Code Gallery. See Microsoft Dynamics CRM 4.0 On Premise Silverlight 2 Bar Chart Sample.

Unlike many code samples you may find, this one includes full step-by-step instructions about building and deploying the sample. It is more like a hands-on-lab. This sample leverages the work done by Humberto Lezama Guadarrama in his post Sample:Silverlight 2 and CRM.

This sample explores the following tasks:

  • Using the Asynchronous methods required by Silverlight
  • Establishing CRM Authentication
  • Using Silverlight Toolkit Chart controls

Using the Asynchronous methods required by Silverlight

One of the things this sample explores is how to use the proxy generated by Visual Studio 2008 for Microsoft CRM 4.0 web services. This is a bit complicated because Silverlight doesn't allow for synchronous Web service calls - and the Microsoft CRM SDK doesn't document the use of asynchronous web services calls. When you create the reference to the Web service in Visual Studio 2008 you don't get a standard CrmService object, you get a CrmServiceSoapClient object which only exposes the asynchronous messages.

Testing indicates that with one notable exception the asynchronous versions of the methods appear to work as expected. One known problem is that the RetrieveMultipleAsync method may return null values. The work around for this is to use the ExecuteAsync method on an RetrieveMultipleRequest that is configured to return Dynamic Entities. This sample shows how this works.

Establishing CRM Authentication

As detailed in Humberto Lezama Guadarrama's post Silverlight 2 and CRM, it is necessary to provide a mechanism to inject a custom CRM Authentication token into the SOAP headers generated by the proxy. This sample uses the same technique.

Using Silverlight Toolkit Chart controls

Finally, when creating this sample I was looking for a way to use Silverlight within Microsoft CRM without writing a complete CRM UI. The Silverlight Toolkit provides some useful components to build charts. Since these could be hosted within a CRM IFrame or launched like a report from a custom button - I chose to use those.

If you are interested in trying Silverlight in the context of Microsoft CRM, I hope this sample helps you.

Cheers

Jim Daly

Posted by crmblog | 0 Comments
Filed under: , ,

Synchronizing and the Offline Client

One of the great features provided by Microsoft Dynamics CRM Online is the ability to take the application offline (i.e. work on a plane).  This capability is made possible by our S+S (software+services) vision of leveraging the best of services (CRM Online) coupled with the best of software (Outlook).  This is not possible in a SaaS (software as a service) model as locally installed software is required to achieve the functionality since an internet connection would not be available to serve up the hosted service.  The offline CRM Outlook client functionality is made possible by utilizing Outlook, a SQL Express database to store the offline CRM data and IIS on the laptop to render the web pages.  This is a competitive advantage of the Microsoft CRM offering that many of our competitors do not offer or are trying to replicate (thus proving the efficacy of the S+S vision).

Recently I was asked the following question:

“When I go Offline with the Outlook client and create a CRM Appointment, will it show up on my Outlook calendar?”

This was a question I recently received from one of our customers.  I believed the answer was yes but I wanted to investigate and take the scenario a bit further to include the core synchronization elements (Appointments, Contacts and Tasks).  So to test I:

  1. Installed the Offline Outlook Client.  There is only 1 Outlook client that supports both subscriptions (Professional – No Offline and Professional Plus – Offline).  In order to achieve the Offline capabilities you must select to install Outlook with Offline Access during the installation process.
    Online or Offline installation option
    NOTE: If you have the Outlook Client installed and upgrade your CRM Online subscription to Professional Plus you will need to uninstall and reinstall the Outlook Client in order to gain the offline functionality.  This WILL NOT delete any of the records previously synchronized with CRM and upon reinstall will maintain the CRM and Outlook record linkage.
  2. Went offline but clicking on the Go Offline button in the CRM toolbar.
  3. Created a CRM Appointment.
    CRM Appointment Created while Offline
  4. Confirmed the synchronization of the CRM Appointment to the offline Outlook Calendar.
    Confirmation of Outlook Appointment created while Offline
  5. Created a CRM Contact
    CRM Contact created while Offline
  6. Confirmed the synchronization of the CRM Contact to the offline Outlook Contacts.
    Confirmation of Outlook Contact created while Offline
  7. Created a CRM Task.
    CRM Task creation while Offline
  8. Confirmed the synchronization of the CRM Task to the offline Outlook Task.
    Confirmation of Outlook Task created while Offline
  9. Created a CRM Appointment in the CRM web client.
    Appointment created in web client while Outlook is offline
  10. Confirmed the Appointment created in CRM Offline has not synchronized to the web database.
    Confirmation that Offline Outlook Appointment does not exist in CRM Online (web) database
  11. Confirmed that the Appointment created in the CRM web client did not synchronize to the Offline Outlook client (only appt. created in step 3 exists).  Synchronized Outlook and CRM by clicking on the Go Online button in the CRM toolbar.
    Confirmation that webclient Appointment does not exist in Outlook.  Synchronizing changes made to offline and web client
  12. Confirmed the Offline created CRM Appointment and CRM Task were synchronized to the CRM web database.
    Task created while Offline now exists in CRM webclient.
  13. Confirmed the Online created Appointment was synchronized to the Outlook client.
    Appointment created while Offline now exists in CRM webclient.

Hopefully this will help you get a better understanding of how the offline synchronization process works with the Microsoft Dynamics CRM Outlook client.

Cheers,

Eric Boocock

CRM Online: Enhanced Internet Lead Capture capabilities now available

For those currently using the Internet Lead Capture capabilities within CRM Online you may have noticed that the functionality was enhanced recently. 

Here are some highlights of what has improved:

- Canadian customers can now take advantage of Internet Lead Capture (AdCenter integration does not apply in Canada)

- There is support for vanity URLs which allows you to leverage your unique CRM Online org name for a specific landing page URL if you decide to have Microsoft host your internet lead capture page

- You have the ability to add any lead field (including custom lead fields) to the Internet Lead Capture web form

- There is an improved Lead Capture Home Page with embedded charts to show lead capture effectiveness

If you aren’t using this functionality today, you can easily activate it by clicking on “Landing Pages” or “Internet Leads” from the Sales or Marketing Tab within the left navigation

image

Cheers,

Brian Galicia

Answers from the Microsoft Dynamics CRM Community

I see a lot of support questions on the CRM Team Blog. Some of them get answered, many do not. The best way to get answers to pressing questions depends a lot on how much customization you do to your Microsoft Dynamics CRM installation. It is also important to know what version you are using. If you have a support plan for your CRM installation, that is hands down the fastest way to to get help. The support team will bend over backwards to get you answers and they are measured on how quickly they can do just that.

forums

As I also maintain the Dynamics Forums I should say that many times that is the fast way to get answers to common questions including common customizations. It helps to have read the documentation before you ask a question, but there are rarely new questions that our forums team hasn’t heard. Examples of questions that will probably not get answered include:

1. Can you give me some custom code to do something for me?

2. How can I do this and I don’t want to read the documentation?

3. I know nothing about CRM, can you tell me enough to get me started? (See number 2.)

4. I have a question about another Microsoft product that has nothing to do with CRM; can you answer that?

When you get a great answer please feel free to mark the post as answered by clicking the ‘Mark as Answer’ button at the bottom of the post. There are a lot of good people including CRM MVPs answering questions and I love to see them get credit for their hard work. With all the Microsoft Dynamics CRM resources available to you, we should be able to answer most of your questions in a timely manner.

Cheers,

JaAG

Windows 7: Be first. Save half.

Win7

Many of you may have heard about the awesome pricing for Windows 7 that Microsoft is offering to customers for the next 10 days. The offer will be available from online retailers and directly from Microsoft through the Microsoft Store. Most of my family and friends are all over this so I thought I’d put it out there for my CRM family.

Windows 7: Be first. Save half.

Pre-order Windows 7 today at Microsoft Store. You'll get it for at least half off and be one of the first to get it. Hurry, quantities are limited.*

It's pretty simple

Windows 7 is coming on October 22, 2009. Here's an easy way to get it fast and save a bundle: Pre-order a Windows 7 Home Premium Upgrade for $49 or a Windows 7 Professional Upgrade for $99 at Microsoft Store.   That's about half off the estimated retail prices.

Want more info? 

Go to the Windows team blog and find out all the details. 

* The offer begins on June 26, 2009 and will continue while supplies last, or until July 11, 2009, whichever comes first.

Cheers,

JaAG

Microsoft Dynamics CRM is in the “Leaders” quadrant in Gartner’s 2009 Magic Quadrant for CRM Customer Service Contact Centers

Customers seeking information before investing in technology often turn to Gartner, Inc., because of its detailed and methodical reviews. Among the most respected reports are its Magic Quadrants, which help buyers assess vendor strengths and weaknesses that can be used to meet the purchaser’s current and future business and technology requirements. Microsoft Dynamics CRM is pleased to note that in the 2009 Magic Quadrant For CRM Customer Service Contact Centers, published April 3, 2009 and written by Gartner Research Vice President and Distinguished Analyst Michael Maoz, Gartner positions Microsoft Dynamics CRM in the “Leaders” quadrant.

Microsoft is positioned in the Leaders Quadrant in the latest Gartner Magic Quadrant Report
on CRM for customer service, April 03, 2009

clip_image002

This Magic Quadrant graphic was published by Gartner, Inc. as part of a larger research note and should be evaluated in the context of the entire report. The Gartner report is available from Microsoft at http://www.microsoft.com/presspass/press/2009/apr09/04-29CRMMQPR.mspx.

Gartner uses 15 weighted criteria to determine whether a vendor is a niche player, a visionary, a challenger or a leader.

The Collective Excellence of Dynamics CRM with other Microsoft Products and Technologies

Delivering the Microsoft integrated customer service contact center vision to Gartner for this report was a collaborative undertaking among not only the many members of the Microsoft Dynamics CRM team but also among many customers who served as detailed references.

Customer Care Framework, which makes it easy for contact center organizations to aggregate disparate applications into a single user interface, is a good example of the kind of value-add that the world of Microsoft brings to Microsoft Dynamics CRM in the contact center. (Learn more at http://www.microsoft.com/ccf

More Details and Read the Full Report

Besides Gartner, Forrester ranks Microsoft Dynamics CRM as a leader in both the Q3 2008 Forrester Wave for Enterprise CRM Suites and the Q3 Forrester Wave for Mid-Market CRM reports, citing functionality, ease of use and time to value. Microsoft Dynamics CRM consistently receives accolades from analysts and press alike. The CRM team considers this to serve as a strong affirmation of the product’s ability to deliver.

The Magic Quadrant is copyrighted 2009 by Gartner, Inc. and is reused with permission. The Magic Quadrant is a graphical representation of a marketplace at and for a specific time period. It depicts Gartner’s analysis of how certain vendors measure against criteria for that marketplace, as defined by Gartner. Gartner does not endorse any vendor, product or service depicted in the Magic Quadrant, and does not advise technology users to select only those vendors placed in the “Leaders” quadrant. The Magic Quadrant is intended solely as a research tool, and is not meant to be a specific guide to action. Gartner disclaims all warranties, express or implied, with respect to this research, including any warranties of merchantability or fitness for a particular purpose.

Cheers,

Karen Smith

Posted by crmblog | 1 Comments
Filed under: , ,

Microsoft Dynamics CRM 4.0 IWorkflowContext Interface

Recently there have been some questions raised on how to use the IWorkflowContext and what data and objects it provides that can be used in your custom workflow activity logic. In this post we will cover the different members available in the IWorkflowContext interface.

The IWorkflowContext interface is the interface that is used to provide a way to obtain business data that is needed to correctly implement your business logic in a custom workflow activity.

In order to start we first need to understand how the IWorkflowContext is initialized.

Where does the IWorkflowContext come from?

The IWorkflowContext is initialized for a particular asyncoperation of type workflow (operationtype 10) when the asyncoperation of type workflow is processed and executed by the Asynchronous Service. However that is only where the context object is created. The data that is contained in the context object was collected prior to this action.

The Workflow Expansion Task plugin executes asynchronously for a particular message in CRM. For example if you have published a workflow to execute on Create of account, the Workflow Expansion Task plugin will be registered as a step on the Create message for the account entity when the workflow is published. The step will execute asynchronously. The Workflow Expansion Task plugin will retrieve all workflow rules that are published and that are configured to execute when the current message executes. So if you have more than one workflow that is published and should execute on the create message, the primary entity for the workflow is account, and you have access to the workflow based on the scope setting, those workflows will be retrieved.

The Workflow Expansion Task plugin will loop over each of the workflows retrieved and create an asyncoperation with an operationtype of 10 (Workflow). When the asyncoperation is created certain attributes are populated so that when the asyncoperation is processed by the Asynchronous Service it knows how to process the record. One of the attributes that is populated is the data attribute. In the SDK documentation the data attribute is a string property. The data property contains one of two types of serialized objects

AsyncOperationData

WorkflowData

Since we are working with an asyncoperation record of type workflow, the object is a WorkflowData object. When the asyncoperation is processed and executed by the Asynchronous Service, this WorkflowData object will be the basis of the IWorkflowContext object that we will have access to in our custom workflow activity.

Now that we know where the IWorkflowContext comes from, let’s look at how we can get access to the interface

How to get the IWorkflowContext object

The IWorkflowContext object can be obtained through the IContextService interface. Great, another interface! How do you get the IContextService interface??? Simple, we can obtain the IContextService interface through the GetService method on the ActivityExecutionContext which is provided as a parameter in our overridden Execute method for our custom workflow activity.

protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)

{

IContextService contextService = (IContextService)executionContext.GetService(typeof(IContextService ));

Now that we have our IContextService interface, we can now access the Context property which is of type IWorkflowContext.

protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)

{

IContextService contextService = (IContextService)executionContext.GetService(typeof(IContextService ));

IWorkflowContext context = contextService.Context;

Now that we know how to get the IWorkflowContext we can now look at what data it can provide

Great, we have the IWorkflowContext! Now what can we do with it?

In order to see what we have access to through the IWorkflowContext we can view the definition of it in Visual Studio by right-clicking IWorkflowContext, then clicking “Go To Definition”. When we do this we see the following

public interface IWorkflowContext

{

Guid ActivationId { get; }

Guid AsyncOperationId { get; }

Collection<EntityDependencyBase> EntityDependencies { get; }

PropertyBag InputParameters { get; }

string MessageName { get; }

Guid OrganizationId { get; }

PropertyBag OutputParameters { get; }

Guid PluginTypeId { get; }

Guid PrimaryEntityId { get; }

DynamicEntity PrimaryEntityImage { get; }

string PrimaryEntityName { get; }

DynamicEntity PrimaryEntityPostImage { get; }

DynamicEntity PrimaryEntityPreImage { get; }

PropertyBag SharedVariables { get; }

string StageName { get; }

Guid UserId { get; }

ICrmService CreateCrmService();

ICrmService CreateCrmService(bool asAdminUser);

IMetadataService CreateMetadataService();

IMetadataService CreateMetadataService(bool asAdminUser);

bool EvaluateCondition(ConditionOperator op, object primaryValue, params object[] values);

object EvaluateExpression(ExpressionOperator op, params object[] values);

void PopulateEntitiesFrom(CrmWorkflow workflow, string parameterName);

int RetrieveActivityCount(bool includeActivitiesCreatedByWorkflow);

}

Let’s go over each member in this interface
Properties

ActivationId: This is the workflowid for the workflowbase record that is the activation record for the workflow. In other words, this describes which workflow this is an instance of.

AsyncOperationId: This is the ID of the asyncoperationbase record.

EntityDependencies: This is a generic collection of EntityDependencyBase objects. An EntityDependencyBase object can be of one of the following types

PrimaryEntityDependency: Specifies the objectTypeCode (Int32), comma delimited attributes to retrieve for the primary entity (String), and the type of parameter it is (Type)

RelatedEntityDependency: Specifies the objectTypeCode (Int32), comma delimited attributes to retrieve for a related entity (String), and the type of parameter it is (Type)

You are going to have 1 PrimaryEntityDependency, and X RelatedEntityDependencies.

InputParameters: InputParameters is a property bag which contains the objects from the request that triggered the workflow. For example, if the workflow executed due to a create message for account, the InputParameters property bag would contain the target account as a DynamicEntity. You access the objects in the property bag just as you would when using a plugin.

MessageName: The name of the message which triggered the workflow to execute. Create, Delete, Update, or SetState.

OrganizationId: The ID of the organization to which this asyncoperation belongs

OutputParameters: OutputParameters is exactly the same as InputParameters. It contains the output of the request. For create, it would contain the GUID of the business entity created.

PluginTypeId: The ID of the plugin type. This is the ID for the compiled Windows Workflow that this asyncoperation is an instance of.

PrimaryEntityImage: A DynamicEntity object that represents the primary business entity for which the workflow is regarding. If you want to get attributes included in the create or update request, you don’t want to use this. Instead get the Target property out of the InputParameters property bag

PrimaryEntityName: The schema name for the entity that this workflow is regarding.

PrimaryEntityPostImage: DynamicEntity which contains the primary entity’s ID attribute along with the values for the attributes defined in the PrimaryEntityDependency after the operation which triggered the workflow to execute. This is not specific to a singular workflow, but contains all the needed attributes for all workflows registered to execute on the same message for the same entity type.

PrimaryEntityPreImage: DynamicEntity which contains the primary entity’s ID attribute along with the values for the attributes defined in the PrimaryEntityDependency after the operation which triggered the workflow to execute. This is not specific to a singular workflow, but contains all the needed attributes for all workflows registered to execute on the same message for the same entity type.

SharedVariables: Another property bag in which you can store data to be persisted to the database for use through-out the execution of the workflow. Also SharedVariables will contain any objects that have been stored in the SharedVariables property bag from the plugin execution context during the entire life of the pipeline for the message which triggered the workflow to execute. So you could store an object in the SharedVariables property bag pre create of an account, and that object would be available in any workflows that were created on create of the account.

Note: The IWorkflowContext’s SharedVariables property gets populated from the SharedVariables property on the IPluginExecutionContext for the “Workflow Expansion Task” asynchronous plugin. The “Workflow Expansion Task” executes in the Child pipeline. So if you want values from before the main operation (BeforeMainOperationOutsideTransaction) you need to register your Pre plugin step in the Child pipeline as well. Further, any SharedVariables you populate after the main operation (AfterMainOperationOutsideTransaction) will not be included even if you register your Post plugin step in the Child pipeline since the “Workflow Expansion Task” executes in the pipeline stage that is not available to third parties (AfterMainOperationInsideTransaction).

StageName: The name of the stage that workflow is currently in.

UserId: If the workflow was executed on demand, this will be the ID of the user who executed the workflow. If the workflow was executed due to a message executing, then it will be the ID of the workflow owner.

Methods

CreateCrmService:

CreateCrmService(bool asAdminUser):

Both of these methods return an ICrmService interface. This is optimal way to interact with CRM to execute the various requests in the CRM web service. The overload allows you to execute with more privileges if needed; just in case the current user doesn’t have the required privileges to perform some action in your custom business logic.

CreateMetadataService():

CreateMetadataService(bool asAdminUser):

Both of these methods return an IMetadataService interface. This is optimal way to interact with CRM to execute the various requests in the MetadataService web service. The overload allows you to execute with more privileges if needed; just in case the current user doesn’t have the required privileges to perform some action in your custom business logic.

RetrieveActivityCount: Retrieves the number of CRM activity records created so far by this workflow

The following methods are for internal use only and are not intended for third party use

EvaluateCondition(ConditionOperator op, object primaryValue, params object[] values):

EvaluateExpression(ExpressionOperator op, params object[] values):

PopulateEntitiesFrom(CrmWorkflow workflow, string parameterName):

Cheers,

Clint Warriner

Posted by crmblog | 1 Comments
Filed under: , ,

How to toggle Smart Matching in Microsoft Dynamics CRM 4.0

Smart matching is the default and the only email correlation strategy shipped with CRM 4. Smart matching uses the subject of the current email along with the email recipients of the current email and generates subject hash and address recipient hash and uses these hashes to compare against old emails to find a match for the subject hash and at least HashMinAddressCount number of address recipients to correlate with an old email. HashMinAddressCount is reg key based and has a default value of 2. Smart Matching is not always the solution that customers are looking for.

Read more about Smart Matching.

How Smart matching works

In cases we have emails that have same subject and atleast 2 (HashMinAddressCount) recipients that match, we treat this as a correlation and set the same regarding object for the new email to the old email which may not be right.

An example can be a Service based CRM setup might have Service Details in the subject and this email is sent to customer service representative and the case is related to customer Bob and there could be a second email that is addressed to the same CSRs with the same subject line but belongs to Customer John Doe. In this case Smart matching wrongly ties these 2 emails together.

Another scenario could be a case where HR sends a New Hire subject line email to a Manager and each email could be related to a different new Hire but Smart Matching will go wrong in this case.

In all these cases, users will have to use caution and always generate unique email subjects to avoid these wrong correlation problems which cannot be that feasible and hence the reason for choosing Tracking Token strategy used in V3 where the token is automatically generated and appended to the subject and emails are now correlated based on the tracking token only.

How to use the tracking token-based solution

1. There is a trackingtoken column that is indexed in EmailBase table that is used for correlating new emails with old emails when using the Tracking Token strategy instead of the Smart Matching strategy. This column is not filled for all emails in CRM v4 as we use Smart matching.

To get this tracking token column populated for the past emails in the database, please use the tool that comes with hotfix KB# 969946 that uses SQL CLR to use the power of regular expressions which are lacking in SQL Server but are available and are used by the CRM Server code to extract the tracking token out of the subject of the past emails in an efficient manner.

For this tool to work correctly in case CRM Server and SQL Server box are different, please make sure to set up same directory structure where the tool got dropped on the CRM Server in the SQL Server box as well. The reason being , the DB Scripts in the Tool install the assembly EmailTrackingTokenExtractor in the SQL Server and creates a user defined function in SQL Server that links to the external assembly function and hence SQL Server looks for this assembly on the SQL Server box.

if CRM is 32bit, and SQL is 64bit you will need both the 32bit Hotfix as well as the 64bit Hotfix. The 32bit dll and the exe must be placed on the CRM server, and the 64bit dll must be placed in the same path but on the SQL server. We found that when SQL is 64bit and you attempt to execute a SQL CLR type from a 32bit assembly you will get an error.

This tool uses the same regular expressions that the CRM server code uses to extract the tokens and so it honors all the different tracking token prefixes and other tracking token settings set in the past.

Once you have the tool extract all the tracking tokens from the subject and populate the tracking token column in the email base you are ready to enable tracking token strategy.

The tool has to run at a time when there is no activity (to reduce the contention on Email table and also not have a flood of emails in between) and once the tool run is complete, the hot fix can be installed and smart matching can be disabled. There is a chance that you might have some emails in that small delta of time so you can re-run the tool again to cover these emails if needed.

Without the power of SQL CLR we would have been forced to retrieve all the emails from the database and process them through the regular expressions in C# layer and bulk update these rows back to the database.

With the power of SQL CLR we can run updates as simple as:

update email set trackingtoken = dbo.ExtractToken(subject)

where trackingtoken is null

and subject is not null

and subject <> ''

where dbo.ExtractToken is a User defined function that refers to the C# function EmailTrackingTokenExtractor.[EmailTrackingTokenExtractor.TrackingTokenExtractor].ExtractToken which is defined in the EmailTrackingTokenExtractor.dll and is now installed in SQL Server.

This eliminates all the round trips between the mid-tier and SQL Server and all the processing including the regular expression processing is happening on SQL Server itself.

2. Follow the instructions of Knowledge Base article KB 958084 and set the DisableSmartMatching registry key to 1 to turn off smart matching after installing KB 958084 hotfix.

For this hotfix to work, please make sure that this registry key DisableSmartMatching is set to 1 and the Use Tracking Token option is set in the Settings. This will direct CRM email tracking manager to correlate emails using the tracking token (CRM V3 strategy) instead of the default CRM v4 Smart matching strategy.

There is no impact to switch back to Smart matching as we still store the address hashes and the subject hashes.

Cheers,

Chandra Akkiraju

Posted by crmblog | 0 Comments
More Posts Next page »
 
Page view tracker