Category Archives: Dynamics CRM 2011

How to Handle Email in Code

Just want to leave here a simple example on how to create, send and retrieve email activities. You can download the crm prototype project with the running example including unit tests. The implementation can be found in the project Qualtech.Crm.BL and the class is named ActivityManager.cs

Deploy Multiple Plugin Assemblies in the Database

I always use more than one assembly to build my custom workflows or plugins. In one assembly I have common base functionality like instrumentation and base exception handling while in the workflow or plugin assembly I build the business logic. Usually you would have to deploy your assemblies in the file system instead of the database because to… Read More »

Service Binding in Code

I like to initialize services in code. The settings once defined they rarely change. This way I implement access to web services in a factory class that serves instances for all the services being consumed by any client assembly. This is how you would go about creating an instance of the CRM 2011 service. You can download a class with… Read More »

Generate a Service Proxy

In CRM 2011 you can generate a proxy of CRM’s web services so you can use any of the entities in your custom code in what is called early binding. You need to have the SDK installed and use the tool crmsvcutil.exe which comes with it. For this example we’ll assume that the SDK has been deployed in the folder E:\CRM2011SDK. You… Read More »

Set a Default User Setting

Recently came across the request to not allow the users to change one of their personal settings. Through role security you can remove permissions so the user is not allowed to make changes to his/her personal settings. The business required that the users to be allowed change their personal settings though they didn’t want them to be able to change their home page setting.