Wednesday, January 30, 2013

Understanding and Development of Custom Workflow Activities in Microsoft Dynamics CRM

As we all know with the release of rollup 12 we can develop custom workflow activity for CRM 2011 online too. We can develop custom workflow for CRM online here are the steps to develop custom workflow activity for CRM 2011 online using visual studio 2012 although there is no difference between developing workflow activity in VS 2010 and VS 2012 but due to great feature of VS 2012 i decided to make the workflow activity in VS 2012.

1. Latest SDK (Download Latest SDK)
2. CRM 2011 must have rollup 12 (By default all online CRM has been update to rollup 12)

Step 1: Create a new CRM Packedge in Visual Studio give any name

Step 2: After you select your project type you will saw a popup box asking for your credtionals fill the form and click ok

Step 3: Add a new CRM 2011 workflow liberary in CRM Packedge solution

Step 4: Right click on CRM 2011 workflow library and click on properties and go to Signin tab

Step 5: From chosse a signing name key file optionset select new the below window will opens give any name and uncheck the checkbox click ok and save your project

Step 6:
After signing your workflow add a new workflow activity class click on your workflow activity -> right click-> add new item

Step 7:
Select workflow activity class as your new item after giving name click ok

Step 8:After you select workflow activity class CRM asks you for below information fill the information and all the information is required

Step 9: Implement your custom business logic

Step 10:  After completing your implementation right click on RegisterFile.crmregister and change IsolationMode to Sandbox

Step 11: Go to Build -> Deploy from visual studio 2012 main menu.
Step 12: After deployment complete you can see your custom workflow activity in your steps

Note: The error that i found while developing custom workflow activity is
1. "Error registering plugins and/or workflows. Description name must be specified Parameter name: description"  if i skip step 8 i got the above error so make sure your have filled all the fields that is in the form.
2. Error registering plugins and/or workflows. Action failed for assembly 'CrmPackageOnline.WorkflowOnline, Version=, Culture=neutral, PublicKeyToken=f24fa33afcfbc3ec': Assembly must be registered in isolation.    C:\Program Files (x86)\MSBuild\Microsoft\CRM\Microsoft.CrmDeveloperTools.12.targets    176    4    CrmPackageOnline
if you skip step 10
Resolution change the RegisterFile.crmregister xml and IsolationMode to Sandbox


Tuesday, January 22, 2013

Using ExecuteMultipleRequest with CRM 2011

ExecuteMultipleRequest METHOD IN ACTION

As we all know CRM 2011 rollup 12 has lunched a new ExecuteMultipleRequest method.
Today i am just exploring this great feature and develop a code snippets and wants to share with you.
Note: Make sure you have latest SDK of CRM 2011

            var service = new XrmServiceContext("Xrm");
            OrganizationRequestCollection collection = new OrganizationRequestCollection();
            for (int i = 0; i <= 5000; i++)
                CreateRequest createRequest = new CreateRequest // create a request and add the request in collection
                    Target = GetEntityRecord()    // this method could returns any entity i.e account, contact etc you could implement your own logic to get the target entity

            ExecuteMultipleRequest excuteMultipleRequest = new ExecuteMultipleRequest // Create ExecuteMultipleRequest object with the above collection
                Requests = collection,
                Settings = new ExecuteMultipleSettings
                    ContinueOnError = false,
                    ReturnResponses = true
            ExecuteMultipleResponse executeMultipleResponse = (ExecuteMultipleResponse)service.Execute(excuteMultipleRequest); //Execute the request
            var results = executeMultipleResponse.Results; //Request result

I hope it helps some one.

What's New in Microsoft Dynamics CRM Rollup 12 for Developers

1. Extended Browser Support

As we all know now CRM supports multiple browser support (Yahoo!) now we have to write the code differently as we have to stay near to Xrm.Page object and do supported customization we don’t need any changing to support other browsers.

View of CRM in Google chrome

Fig. 1

Note: If you want to check the browser compatibility mode you can use the custom code validation tool Download custom code validation.

2. New feature in Activity Feeds

CRM introduces new Social media functionality of like/unlike.

 Fig. 2

3. New UI for Sales and Customer Service and Product Update Functionality

New user experiences has been added for Opportunity , Lead and Case.

Fig. 3

4. Custom Workflow Activities for Microsoft Dynamics CRM Online

Now we can register custom workflow activities with CRM online too

Note: If you want to create workflow activity please check this link Create and deploy workflow activity using Developer toolkit

5. Developer Toolkit Support for Microsoft Visual Studio 2012

With rollup 12 Microsoft has also lunched The Developer Toolkit for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online that supports Microsoft Visual Studio 2012. The installer can be found in the SDK download in the sdk\tools\developertoolkit\ folder.
Download CRM Toolkit

6. Bulk Data Load

If you want to Load bulk data in CRM now you can use ExecuteMultipleRequest message.

For more details please check following link
New features for developers in rollup 12

Wednesday, January 16, 2013

MS Dynamics CRM vs Salesforce - 5 Deciding Factors

In my last project my client asks me to give him some suggestion to choose the CRM product between Microsoft Dynamics CRM and Salesforce. And depending upon the below criteria I told him why to go for Dynamics CRM.

Here is a comparison of two major CRM products

1. In Microsoft Dynamics CRM we have a lot of options to integrate it with any other application and also office 365 makes it really easy to manage all the things on one place. And in Salesforce we have limited integration capabilities.

2. You could use any deployment option for Microsoft CRM (on-premise, Saas, on-premise hosted, or hybrid) depending upon your business requirement for example if you have resources to manage deployment on server you could go for on-premise version otherwise you have an option of online but in Salesforce you have only one option which is SaaS

3. Overall cost of Dynamics CRM is cost effective you could go for on-premise or online but for salesforce its twice than Microsoft Dynamics CRM online edition and if you need to do more customization you have to go for enterprise edition which is very costly and you have to learn a new language called Apex to add any new feature in it.

4. We could configure almost everything in Dynamics CRM like workflows, role-base views, filed level security its SDK is very powerful we could integrate any application with the help of web services. But Salesforce is not highly configurable.

5. CRM 2013 or CRM 2011 (rollup 12) has built in Yammer, Skype and Bing Maps integration. And upcoming rollup also has cross browser capabilities.

Depending upon the above criteria I suggest my client to go for Dynamics CRM because it is cost effective and if he wants to automate the overall process and uses its custom feature. 

I hope it helps someone :)