Tuesday, December 14, 2010

Microsoft Dynamics CRM 2011 Release Candidate (RC) Announcement

The Microsoft Dynamics CRM 2011 Release Candidate (RC) is now available for download from the Microsoft Download Center.  As with the Microsoft Dynamics CRM 2011 Beta, the Release Candidate is available for anyone to download, and will be available until the RTM release.  

This release represents the combined efforts and feedback from customers, partners and Microsoft teams working on the Microsoft Dynamics CRM 2011 Beta so thank you for all of you involved in this process.

Microsoft Dynamics CRM 2011 Server Release Candidate 05.00.9688.34
Microsoft Dynamics CRM 2011 for Microsoft Office Outlook 05.00.9688.32
Microsoft Dynamics CRM 2011 Language Pack (41 Languages)
Microsoft Dynamics CRM 2011 Report Authoring Extension
Microsoft Dynamics CRM 2011 E-mail Router
Microsoft Dynamics CRM 2011 List Component for Microsoft SharePoint Server 2010

Enjoy RC !!!

Wednesday, October 20, 2010

To view and refresh data, Microsoft Dynamics CRM for Outlook must be installed

When trying to export data from CRM to a dynamic pivot table you receive the following message: “To view and refresh data, Microsoft Dynamics CRM for Outlook must be installed”, although the CRM Outlook client has already been installed and CRM is added to the Trusted Sites.

To resolve this issue follow the steps below.

1. Click on the cell which contains the message “To view and…”

2. Click on Connections [from DATA Tab]
It will open a Connection Window.

3. Click on Refresh [from Connection Window]

Now, the data will appear in the data sheet.

Happy import / export !!!!!

MS CRM 2011 Beta - CallerOrigin in Plugins is no more !!!

CallerOrigin has been removed in CRM 2011 Beta.

According to Experts, since the CRM 4 implementation was neither extensible nor reliable\secure. The recommendation is to not rely on caller origin when you extend business logic in the server (since it is easy for a client to spoof this data)

If you absolutely need it and can guarantee \ do not care about spoofing, create a custom field and pass additional origin info from the client.

Please note that we have a new property isOfflinePlayback in PluginContext to identify if a plugin was triggered as part of the Offline Playback.

Please have a look at the IExecutionContext. It has below properties:1. IsExecutingOffline
2. IsOfflinePlayback

For more information you can see in the CRM 2011 Beta Sdk. Topic = "IExecutionContext Members "

Hope it helps.

MS CRM 2011 Beta - Number of Tabs = 100

In MS CRM 4.0, there is a limit of 8 tabs for every entity. 

According to CRM 2011 SDK, "Each form can include up to 100 tabs. Tabs are a vertical stack separating the body of the form. Tabs may be expanded or collapsed. Navigation links below the form selector provide access to tabs. The body of the form will scroll to display the selected tab."

Tuesday, September 21, 2010

MS CRM 2011 Beta - You have already imported and upgraded this organization and cannot perform this operation again.

This is new in MS CRM 2011.

You will receive the above error in MS CRM 2011 when you try to import an Organization of MS CRM 4.0.

This is because in CRM 2011, you cannot import the same CRM 4 org more than once into a CRM 2011 deployment. The Organization GUID will not change. This is by design.

Hope this helps.

MS CRM 2011 Beta - DeletionStateCode - No longer available.

Finally it's time to say good bye "DeletionStateCode" attribute. The attribute has been removed from all entities.

Now, it is hard delete. If a record is deleted, it would be removed from the entity table.

Happy purging !!!!

Thursday, September 16, 2010

MS CRM 2011 Beta - Ribbon Example [Grid / Form / Subgrid] Example.

I've started playing with Ribbons in MS CRM 2011 Beta.

Attached the code which creates below:
1. Custom Tabs
2. Custom Multiple Groups
3. Multiple Buttons in each group.
4. Pass values from Button click to Javascript.

Please download the code from the below link.

Hope this will help. Please let me know if you help.

Wednesday, September 15, 2010

MS CRM 2011 Beta - Product Keys

Here are the Product Keys for MS CRM 2011 Beta.

The following product keys are available for this release:
•Microsoft Dynamics CRM Workgroup (5 CAL limit):

•Microsoft Dynamics CRM Server (no CAL limit):

•Although the application may display a 90-day trial period, these trial product keys will expire after 270 days.
•Microsoft Dynamics CRM Professional edition is no longer available with Microsoft Dynamics CRM 2011.

Tuesday, September 14, 2010

MS CRM 2011 Beta - Error adding user on On-Premise

You may get the following error when trying to add a user to an on-premise organisaion in MS CRM 2011 Beta.

1. You do not have the necessary permissions to change the domain logon name for this user. The following user was not added: ....
2. An error has occurred

As of now the resolution is an IISRESET on the CRM Server.
1.) Open the CMD window (Run as Administrator) on the CRM Server
2.) type iisreset, then Enter.

Hope this helps.

MS CRM 2011 Beta - Invalid User Authorization

You might see below [Invalid User Authorization] error when trying to access / connect to Online CRM 2011.

The work around is, sign out of the currenyly logged in Windows Live ID from all other browser sessions. Once you signout, try to access your Online CRM, now it will prompt for Sign in details.

As of now Online CRM 2011 can't handle this. Hope this will be resolved in RTM by Microsoft.

Hope this helps.

Monday, September 13, 2010

MS CRM 2011 Beta - The NetworkCredentials provided were unable to create a Kerberos credential.

You might get the below error when trying to create a token for MS CRM 2011 Beta organisaion :

The application terminated with an error.
The token provider cannot get tokens for target ''.

The NetworkCredentials provided were unable to create a Kerberos credential, see inner exception for details.
This is quite possible when you CRM is on Domain A, and you are trying to create a token from Domain B.

it's not going to work in beta currently. I believe there is an open bug for this. Hope it will get resolve in RTM.

See more information on the same:
Troubleshooting authentication problems with the Beta releases

Install MS CRM 2011 Beta on Windows 2008 SP2 or Windows 2008 R2?

I think everybody is consfuse when choosing the Operating System. So here are the facts:

1. You can choose either Windows 2008 SP2 or Windows 2008 R2.

2. But When usingWindows 2008 R2 you need to consider especially this one:
    Import organization fails with Microsoft Dynamics CRM 4.0 organization database when running on Windows Server 2008 R2.

To work around this issue, install Microsoft Dynamics CRM 2011 Server on a computer that is running the original release of Windows Server 2008, and then try the import organization operation again.

Thursday, September 9, 2010

Say Hello to the World of Dynamics CRM 2011 Beta version

Today, the Microsoft Dynamics CRM team has reached a key milestone as it releases the beta of Microsoft Dynamics CRM 2011, for both cloud-based and on-premises deployments.

Available for download and testing in eight languages (English, French, German, Hebrew, Italian, Japanese, Spanish and Chinese) and 36 markets, this release marks the first global public beta for Microsoft Dynamics CRM Online.

Additionally, beta for Microsoft Dynamics CRM 2011 on-premises is available in 40 markets in eight languages.

Please see the below links for:
Microsoft Dynamics CRM 2011 Beta - On-Premise Download link
Microsoft Dynamics CRM 2011 Beta - Online and On-Premise Download link

Hope you enjoy the links.

Thursday, August 26, 2010

Declare Global Access Level functions in MS CRM Form.

Global functions in MS CRM Form.

The way CRM adds the javascript to the page, any function defined in the onload event will only have a local scope and can only be called from within the same onload event. However, if you put the function on the window object, then it should have global scope:
window.MyCustomFunction = function() { ... }

And then you should be able to call the function from an onchange event.

// function name = MyCustomFunction
window.MyCustomFunction = function() {
    alert("My Global Level Function");

1. Go to MS CRM -> Customisations -> Customise Entity -> Choose Entity -> Form and View
2. Go to OnLoad()
3. Put the above fucntion onLoad() // Should be first statment.
4. Go to OnSave()
5. Call this function, MyCustomFunction();
6. When you try to save the entity record this fucntion will get executed.

Hope you enjoy this tip.

Wednesday, August 11, 2010

A simple definition of Windows Azure

Here is an interesting video that’s informative as well. It’s Friday evening after all , so chill out and enjoy this really nice & simple video that Steve Marx created to explain “What is Windows Azure?” with simple terms and hand drawn sketches.

Now that was a great, wasn’t it. Hope you like this video.

Monday, July 19, 2010

Sunday, July 18, 2010

MS CRM Social Networking Workflow DateTime Format Error.

The accelerator code as supplied does not correctly parse Twitter timestamps. DateTime.ParseExact breaks on the odd time zone value, which in (GMT/UK) comes from twitter with the value "+0000".

DateTime.ParseExact can use a format string of "z", "zz", or "zzz", corresponding to "+0", "+00" or "+00:00" respectively, none of which match the Twitter format.

You need to change the code in teh BuildDynEntity() method, in msa_datapump.cs, as follows:

case "CrmDateTimeProperty":
//Twitter timestamps contain odd timezone specifier "+0000" that doesn;t work
// well with DateTime.ParseExact().
CrmDateTimeProperty crmDateTimeProperty = new CrmDateTimeProperty();
CrmDateTime crmDateTimeValue = new CrmDateTime();
DateTimeOffset parsedDateTime = DateTimeOffset.ParseExact(CRMAttrValue, "ddd MMM dd HH:mm:ss zzz yyyy", null);
DateTime localDateTime = new DateTime(parsedDateTime.Ticks, DateTimeKind.Local);
crmDateTimeProperty.Value = CrmDateTime.FromUser(localDateTime);
crmDateTimeProperty.Name = CRMAttrName;

Save / Complile / Build the assembly.

Register the assembly using plug-in registration tool.
Restart the Microsoft Crm Async Service.

Start Creating the Twitter User. Now the workflow won't failed (i mean it will not be on the Waiting state anymore !!!).

Hope this will resolves the issue.

MS CRM Social Networking Workflow Error (Twitter-Get External Updates / Missing Attributes)

Recently I've installed MS Social Networking Accelerator for MS CRM 4. The installation is very simple, it will get installed very easily. Once you installed and run you will encounter the Workflow errors:

Basically the MSA_snStatus Entity Customisation has some bugs. It does not include the below three attributes: You need to manually create those three attributes.

Open MS CRM App -> Go to Settings -> Go to Customisations -> Customise Entity -> Open MSA_snStatus entity -> Go to Attributes (left hand navigation panel)

Step 1. Add new attribute
Step 2. Specify attribute Display name = Contributors
Step 3. Specify attribute name = msa_snContributors [make sure your application default prefix is msa]
Step 4: datatype = nVarChar
Step 5: specify length = 200
Step 6: Save and clsoe

Repeat the same steps for below attributes:
2. MSA_snCoordinates attribute [Display name = Coordinates / nVarchar / 200]
3. MSA_snPlace attribute [Display name = Place / nVarchar / 200]

Save and Publish the entity.
Reload the MS CRM Application.

Start Creating the Twitter User. Now the workflow won't failed (i mean it will not be on the Waiting state anymore !!!).

Hope this will resolve the issue.

Sunday, July 11, 2010

SharePoint Products and Technologies: 2010 (Technical Preview) Developer Documentation

Sharepoint 2010 VPC Image would be available soon. Till then you should download Sharepoint 2010 Technical Documentation.

Sharepoint 2010 developer documentation contains details about
How to Customizing the Ribbon in Windows SharePoint Services "14". The Ribbon is now included in the user interface for Windows SharePoint Services “14” and Microsoft SharePoint Server 2010.

This developer tutorial for sharepoint 2010 describes how developers extend it using a combination of XML and ECMAScript (JavaScript, JScript).

Customizations to the Ribbon in the included example are created using the Feature infrastructure, and can be deployed using a solution package (.wsp file). This tutorial for sharepoint 2010 is provided in both PDF and XPS format.

This compiled help (.chm) file contains reference topics focusing on types and members that are called by other Microsoft applications. This reference does not reflect the entirety of the SharePoint Products and Technologies 2010 managed object model.

The full SharePoint Products and Technologies 2010 SDK will accompany the public release of SharePoint 2010.
Download Sharepoint 2010 Technical Documentation

Sunday, June 13, 2010

MS CRM Rollup 11 Known Issue (ISV config)

After installing UR11 one cannot find the menus which were added in ISV config.

Workaround until SE fix (TBD):
Add regkey [HKEY_CURRENT_USER\Software\Microsoft\MSCRMClient] "InitToolbarForO14"=dword:00000001

Monday, June 7, 2010

Passing / Sharing Data Between Plug-ins

The message pipeline model provides for a PropertyBag of custom data values in the execution context that is passed through the pipeline and shared among registered plug-ins. This collection of data can be used by different plug-ins to communicate information between plug-ins and enable chain processing where data processed by one plug-in can be processed by the next plug-in in the sequence and so on. This feature is especially useful in pricing engine scenarios where multiple pricing plug-ins pass data between one another to calculate the total price for a sales order or invoice. Another potential use for this feature is to communicate information between a plug-in registered for a pre-event and a plug-in registered for a post-event.

The name of the parameter that is used for passing information between plug-ins is SharedVariables. This is a collection of System.Object. A common type of object that is used to fill the collection is DynamicEntity. At run time, plug-ins can add, read, or modify properties in the SharedVariables property bag. This provides a method of information communication among plug-ins.

Note Only types that are XML serializable should be placed in SharedVariables. All types derived from BusinessEntity are XML serializable.

The following code example shows how to use SharedVariables to pass data from a pre-event registered plug-in to a post-event registered plug-in.


using System;
using Microsoft.Crm.Sdk;
using Microsoft.Crm.SdkTypeProxy;

public class AccountSetStatePreHandler : IPlugin
public void Execute(IPluginExecutionContext context)
// Create or retrieve some data that will be needed by the post event
// handler. You could run a query, create an entity, or perform a calculation.
//In this sample, the data to be passed to the post plug-in is
// represented by a GUID.
Guid contact = new Guid("{74882D5C-381A-4863-A5B9-B8604615C2D0}");

// Pass the data to the post event handler in an execution context shared
// variable named PrimaryContact.
new PropertyBagEntry("PrimaryContact", (Object)contact.ToString()));
// Alternate code: context.SharedVariables["PrimaryContact"] = contact.ToString();

Writing the Plug-in Constructor

The Microsoft Dynamics CRM platform has special support for a plug-in constructor that accepts two string parameters. If you write a constructor for your plug-in that accepts two string parameters, you can pass any two strings of information to the plug-in at run time. The following code shows these two parameters.


using System;
using Microsoft.Crm.Sdk;
using Microsoft.Crm.SdkTypeProxy;

namespace CustomPlugin
public class ContactCreate: IPlugin
public ContactCreate(string unsecure, string secure)
// Do something with the parameter strings.

public void Execute(IPluginExecutionContext context)
// Do something here.

The first string parameter of the constructor contains public (unsecure) information. The second string parameter contains non-public (secure) information. However, the secure string is not passed to a plug-in that executes while offline.

The information that is passed to the plug-in constructor in these two strings is specified when the plug-in is registered with Microsoft Dynamics CRM. When you use the PluginRegistration tool to register a plug-in, you can enter the secure and unsecure information in the Secure Configuration and Unsecure Configuration fields provided in the Register New Step form. The PluginDeveloper tool only supports the unsecure string through its CustomConfiguration attribute of the Step tag in the register.xml input file.

Debugging a Plug-in

The following steps describe how to debug a plug-in.

1. Deploy the plug-in assembly.
Copy the assembly to the standard plug-in folder on the server: \Server\bin\assembly. If there is another copy of the assembly at the same location and you cannot overwrite that copy because it is locked by Microsoft Dynamics CRM, run the iisreset program in a command window to free the assembly.

2. Register the plug-in on the desired stage of the event execution pipeline. Register the plug-in assembly on the server using on-disk deployment.
Tip It is possible to debug a database deployed plug-in. The compiled plug-in assembly's .pdb file must be copied to the server's \Server\bin\assembly folder and IIS must then be restarted. After debugging has been completed, you must remove the .pdb file and reset IIS to prevent the w3wp.exe process from consuming additional memory.

Generally, you do not want to register your plug-in in the event execution pipeline until the plug-in assembly is available on the Microsoft Dynamics CRM server. If someone else is using Microsoft Dynamics CRM on the server, and you have registered the plug-in in but have not yet deployed the assembly, the person running Microsoft Dynamics CRM receives an error if the system tries to execute the missing plug-in.

3. Configure the debugger.
Set a breakpoint in your plug-in code. For an online plug-in, attach the debugger to the w3wp.exe process on the Microsoft Dynamics CRM server. For an offline plug-in, attach the debugger to the Microsoft.Crm.Application.Hoster.exe process. For asynchronous registered plug-ins (or workflow assemblies) attach to the CrmAsyncService.exe process. If there are multiple processes running for the same executable file, attach the debugger to all of them because you do not know which process runs your custom code.

4. Test the plug-in.
Run the Microsoft Dynamics CRM Web application, or other custom application that uses the SDK, and perform whatever action is required to cause the plug-in to execute. For example, if a plug-in is registered for an account creation event, create a new account.

5. Debug your plug-in code.
Make any needed changes to your code so that it performs as you want. If the code is changed, compile the code into an assembly and repeat step numbers 1, 3, and 4 in this procedure as necessary. However, if you change the plug-in assembly version number, you must unregister the earlier version of the assembly and register the new version.

6. Register the plug-in in the database.
After the edit/compile/deploy/test/debug cycle for your plug-in has been completed, unregister the (on-disk) plug-in assembly and then reregister the plug-in in the Microsoft Dynamics CRM database.

Create a CrmService proxy for plug-ins that execute in the child pipeline.

We always come across creating a CrmService Proxy for plug-ins that execute in the child pipeline. In a Child pipeline, you must instantiate the CrmService or MetadataService manually. We just need to check the InvocationSource Property (Child = 1, Parent = 0) of the IPluginExecutionContext. Pass the InvocationSource Property value to the below method.

Below is very simple code which creates a proxy.
/// The execution context that was passed to the plug-in's Execute method.
/// Set to True to use impersonation.
/// A CrmServce instance.
private CrmService CreateCrmService(IPluginExecutionContext context, Boolean flag)

CrmAuthenticationToken authToken = new CrmAuthenticationToken();
authToken.AuthenticationType = 0;
authToken.OrganizationName = context.OrganizationName;

// Include support for impersonation.
if (flag)
authToken.CallerId = context.UserId;
authToken.CallerId = context.InitiatingUserId;

CrmService service = new CrmService();
service.CrmAuthenticationTokenValue = authToken;
service.UseDefaultCredentials = true;

// Include support for infinite loop detection.
CorrelationToken corToken = new CorrelationToken();
corToken.CorrelationId = context.CorrelationId;
corToken.CorrelationUpdatedTime = context.CorrelationUpdatedTime;
corToken.Depth = context.Depth;

RegistryKey regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM");

service.Url = String.Concat(regkey.GetValue("ServerUrl").ToString(), "/2007/crmservice.asmx");
service.CorrelationTokenValue = corToken;

return service;