Thursday, April 30, 2009

CS0433 Error in Dynamics CRM and its resolution

To incorporate a custom .NET application in Dynamics CRM, you are required to copy the custom forms to ISV folder and the compiled library to the bin folder. Sometimes it may so happen that after you have copied the dll to the bin folder and refresh CRM, it would just not load. One small custom application has brought down your CRM.

If you enable DevErrors in the web.config file, you would see a screen similar to this when you open CRM.

Cause: When developing the custom application, the project had a Global.asax added to it. When you compiled the project into a DLL the global.asax class was included in the compiled library. CRM 4.0 only requires a single Global.asax file and it has already included that in its own libraries.

Resolution: You need to remove the Global.asax from your project and compile it again. Put the revised dll in the bin folder and your CRM and the custom application is up and running.

Monday, April 27, 2009

Maps Integration for Dynamics CRM 4

There has often been a need especially when you have Sales rep requiring to visit the clients on-site to be able to get the directions to the customer location. Google Maps, Live Maps, Mappoint are some of the services that you can use to incorporate this feature in CRM. While Mappoint is a paid service, the other two are free services and can be used to plot the customer address on the map.

One of the important pre-requisites while plotting a customer address would be to geo-code (get the latitude and longitude) the addresses. It is using these geo-coding that the addresses are plotted on Map. Since a customer’s address would not change often, it is a good idea to write a workflow that will geo-code the customer addresses each time a new customer is created or its address updated.

The following webservice from Google can be used for geo-coding addresses.

Once the addresses are geo-coded, we can add a tab on CRM account/contact form and display the customer address in a map. The map will place a pushpin at the customer location.

This can further be extended to get the Route and Directions to the customer location from a base location.

Using Live Maps it can be done using the following code

locations = new Array(‘addr1’,’addr2’);

//Make an object of RouteOptions
var options = new VERouteOptions;

// Draw the route
options.DrawRoute = true;

// So the map doesn't change:
options.SetBestMapView = true;

// Call this function when map route is determined:
//options.RouteCallback = ShowTurns;

// Show as miles
options.DistanceUnit = VERouteDistanceUnit.Mile;

// Show the disambiguation dialog
options.ShowDisambiguation = true;

//Show the directions on the map
map.GetDirections(locations, options);";

This will show a map with the route marked starting from the start point to the end location.

Another use of integrating maps would be to search of location within a given distance range. So you are visiting a customer in “Redmond” and would want to find out the other customers that are in and around this location so that you could schedule an appointment with them. Or it could be used for schedule service requests for a sales rep. If a salesrep was already scheduled for a call in Redmond area and there was another ticket raised for that area it could be handed to the same sales rep for servicing.

This could be done by finding the distance between the base location and other customer addresses and plotting the customers that fall within the requested distance on the map. One pushpin will be placed on the map for each customer address that is being shown in the map.

There is so much you can do with Maps :) And it is pretty easy to as its shown above and requires a bit SDK skills and programming knowledge. The web is full of details as to how to use various maps functionality to achieve the same. We at Inogic were debating whether to come up with an add-on for Live Maps integration at all or just leave it for you people to figure out on your after giving you the above methodology.

Friday, April 24, 2009

Use of Shared Variables in Plugins

Apart from the various improvisations of Plugin over Callouts, is the ability to share data between events of an entity. This option was not available when working with Callouts in CRM 3.0. The workaround we used then was to create an attribute and store the information in an attribute in the Pre Create event. In the Post Create use the value of the attribute.

Plugins in CRM 4.0 have introduced the concept of Shared Variables. So now instead of storing the values in a custom attribute you can store the value in a context variable. This is then available in the Post event for use. It is possible to read/write data into SharedVariables of context.

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.

public class PreTest : 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.
context.SharedVariables["PrimaryContact"] = contact.ToString();

public class PostTest : IPlugin
public void Execute(IPluginExecutionContext context)
// Obtain the contact from the execution context shared variables.
if (context.SharedVariables.Contains("PrimaryContact"))
Guid contact = new Guid((string)context.SharedVariables["PrimaryContact"]);
// perform action on contact.

Thursday, April 16, 2009

Intuit QuickBooks integration link with Dynamics CRM 4.0 released

QuickBooks is one of the most popular accounting packages for the SME segment. There has always been a need to integrate CRM with accounting system to avoid duplicity as well as to improve productivity and efficiency by providing the sales people using CRM a view of the financial details of the customer so as to enable them to handle the sales/marketing process better.

To satisfy these needs, Inogic lab have come up with a link which has been deployed at a number of customer sites and we have now packaged it and would like to announce the release of version 3.0 of the integration having the following features:

Customer Synchronization: Accounts of Dynamics CRM and Customers of QuickBooks are completely synchronized. You can save an Account in Dynamics CRM and promote it to QuickBooks. Vice versa, you can synchronize customers from QuickBooks applications to view and edit it in Dynamics CRM. Any edit and update on the Dynamics CRM side reflects in QuickBooks in the real time.

Invoices and Orders Viewing in Dynamics CRM: Complete view of a particular customers Invoice and Orders history from QuickBooks in Dynamics CRM within the Account form.

Promote Orders from Dynamics CRM: This feature is extremely useful for Sales people to make Orders against opportunities in CRM and then promote it to Quick Books for further processing.

Quick Customer Account Information: Various financial important data like Credit Limit, Aging, and Terms etc from the Quick Books is available against the Dynamics CRM customer for viewing by Sales People.

Versions supported:
Enterprise 8.0 US/UK Edition

Microsoft Dynamics CRM: 4.0 On-premise (IFD not supported), Partner Hosted and CRM Live.

The challenge for integration between QB and Dynamics was the inherent difference in the SDK and databases and having a detailed knowledge of the accounting system as well as CRM system. It is not easy to code and develop an integration which takes care of deduplication, checks out the security rights and also takes into account that accounting compliance are maintained. You also need to have a knowledge of QB SDK as well as be confident about the financial aspects of the system as Order Entry process needs to be duplicated in the integration. If you require more information with regards to QB and would like to pick our brains in terms of integration with any other accounting package which you are attempting, please be free to email us and we will be more than willing to discuss our experience with the same.

Wednesday, April 15, 2009

Import Price Lists in Dynamics CRM

CRM 3.0 provided limited support for importing data from external files. We were only allowed to import data of few entities like Account, Contact, Lead etc.

This feature has been greatly enhanced in version 4.0. The import tool now allows to import data into most of the entities. It also allows for Mapping of attribute values especially for Picklist type of attributes.

One of the shortcomings though is that it doesn’t update existing records. It will always create new records from the import file. The work around for this would be to develop your own custom application using CRM SDK.

We found that companies receive Price Lists from their vendors on a regular basis and they were required to import and update the prices in CRM for the Products. Since the Import tool would not work in this scenario we had to develop an import tool.

Using SDK we create/update Price List Items (the entity that stores the prices). Price Lists Items are created as a unique combination of Product/Unit and Price List. A change in either of these 3 attributes will result in a new Price List Item record.

Once we were able to create/update Price List Item, we extended it further to take care of scenarios where the Product itself does not exist in CRM. In this case to import the price we were required to first create the Product in CRM and then create a Price List Item for that product. Note that Product entity has few of its attributes mandatory so you need to take care of this in the External file so that the product can be created successfully.

With a successful implementation of this, we went a step further to generalize this tool so that the tool could be used to import and set the values for any of the attributes of Product or Price List Item. This was not too difficult. The only requirement was that the column name in the external file should match the attribute's schema name in the Product or Price List Item entity. With this requirement satisfied you can now set the values for custom attributes on your product entity.

Any SDK developer with good knowledge of Dynamics CRM can take the above route and validation to develop an Import tool for repetitively importing product price list in CRM. For those who do not want to reinvent the wheel, you can contact us or any other third party developers who must have developed this product already. More information at

Thursday, April 9, 2009

Edit CRM Messages

Its quite often that we need to change the default nomenclature of CRM to customer specific normal like renaming Account to Customer, Lead to Prospect and so on.

When you change the entity name the name is reflected on most places. However in the messages and other related functionality of CRM it still reflects the old name so for e.g. even though you have changed the entity name of Lead to Prospect it would still show “Convert Lead…” on the button.

To change such labels and other related messages that CRM displays related to this entity it is important that will also change the Messages section of the entity.

You can follow the steps below:

1. Go to Settings => Customization
2. Edit the Lead Entity
3. Choose the Messages navigation option.You will find a list of all messages displayed/used by CRM for this entity.

4. Edit the message as required and save and Publish the entity to see the changes.

Monday, April 6, 2009

Integrating DOTNETNUKE with Self Service Portal for Dynamics CRM


This is a widely used Open source framework available to develop websites without requiring much technical knowledge. Its framework provides for developing custom modules that can integrate seamlessly with the main DNN website. DNN also takes care of security by providing website owners to provide access to different sets of users to different functionalities on the portal.

Self Service Portal:

Any self service portal (in our case Inogic has a product for Self Service portal/Customer Portal) to allow CRM users to allow their customers to register tickets through the Portal and monitor its progress online. These customers use the portal to register incidents that are directly created in CRM and any updates by the company on their case is reflected to them through the portal.

Linking the two:

We need to create a DNN module for our Self Service Portal that can be installed within DNN. DNN uses the concept of User Controls. We needed to convert each of the web forms that we had to user controls.

Once they were converted to User controls you can add these Controls to DNN and associate it with your module. Once the controls have been uploaded, user can use these controls to add on their pages as and where they wish. can include these in your DNN module. These controls can then be used by end users to add on the pages they wish.

The Self Service Portal had its inbuilt security that was integrated with CRM by adding custom attributes to store the login id and password of the customers. This was taken care of in DNN module by using the DNN security. So only users that are registered on the DNN site had access to the Portal. We could well do away with this security check from CRM as DNN already has a robust security architecture.

Advantages of linking:

A customer centric website can be designed using DNN by the users easily while also utilizing the entire features of CRM's customer service portal.