Workflows vs Plugins in MS CRM

What is the Issue?

When to use workflows and when plugin? What is the difference in these two?

What is Confusion –

Many of the developers or MS CRM beginners get confused in some scenarios whether to go with Workflows or to go with Plugins, as both can be used and has ability to perform specific task at server side.

Solution –

Plugins and workflows have some specific and significant differences-

1. Workflow has specific set of event messages i.e. triggering points as below.
WF
On the other hand other than these basic event messages Plugin has huge set of event messages like AddItem, AddMember, GrantAccess, ModifyAccess, RemoveRelated and so on.

2. Workflows has limitations of Pre-event stages for some of the main events like delete has only before. And for plugin you can trigger the event on stages like pre-validation, pre-operation, post-operation. 

3. Some operations like deleting record from wizard workflow is not possible. So for this you can use custom workflow/Plugin.

One more simple rule you can remember- Whatever scenarios cannot be done with workflows, all that can be done using plugins.

Hope this will help you to understand Workflows and Plugins.

Enjoy MS CRM!!!

Ms Dynamics 365 :Plugin registration tool – Not able to connect to CRM Organization

What is the Issue?

When we try to connect MS Dynamics365 latest version (v9) using plug-in registration tool , it won’t connect the organisation showing some errors like-
1.pluginreg1

2.You don’t have permission to access any of the organizations in the Microsoft Dynamics CRM Online region that you specified. If you’re not sure which region your organization resides in, choose “Don’t know” for the CRM region and try again. Otherwise check with your CRM administrator.

The Reason-

The reason for these two errors are very different-

For issue 1- You don’t have latest version of sdk /Plugin registration tool.

For issue 2- You  are trying to connect to the org from the your private network with some particular domain.

Solutions-

Solution according to the issues-
For issue 1-
Download the latest plugin registration tool.
1. You can use msdn in which microsoft has provided power shell command to download the tool.
OR
2. Follow the step->
-Open Visual Studio
-Add new Project -> Class Library
-Right click on Project in Project explorer.
-Click on Manage Nuget Packages.
pluginreg2
-Search online for
prtDownload
PluginReg3
– Install the Nuget package and Close the window.
OR
-Alternative way to install nuget package you can use PM Console in Visual Studio-
-Use the following command-
PluginReg4
-This will download the latest Plugin Registration tool which needs to connect MS Dynamics 365 (V9.0)
-Now Open the Solution Location –
pluginreg5
-Navigate Location –
prtLocation
– You will find the plug in registration tool with latest SDKs.

Use this latest tool to connect MS Dynamics 365.

For issue 2-
If you are trying to connect CRM org with latest Plugin registration tool in your private network with some particular domain you will face the 2nd issue mentioned above.
To solve this issue you just need to open file “PluginRegistration.exe.config”
pluginreg6


And add the following Tag under the <Configuration> tag-
pluginReg7

Save file and close.
Now close the Plugin  Registration tool if any open and again start the tool. You will be able to connect your MS Dynamics 365 Organization.
Hope, this will help you.

Changes not reflecting on forms while importing managed solution to organization in MS Dynamic CRM

What is the Issue?

After importing managed solution to the organization, changes on the forms not reflects.
Example- MS Dynamic CRM developer made some changes on form which is already exists in organization,like changed display name of field on form or added some function on onChange event of some field, but when imported this changes through managed solution the labels not changed or function is not added on OnChange Event of field.

The Reason-

You will face this issue in case of unmanaged changes over managed entities in the organization.These managed entities maintains the customization even after importing new changes.

Solution-

We can divide the issue in two parts.
1. New events added to the form components.
2. The exiting field properties changed on the form.

The solution for issue 1-
These changes can be moved overwriting existing the managed solution which already contains the entity form which you want to update.

The solution for issue 2-
The simple solution for the first issue is to add new tab on form and move the updated fields to the new tab and format this tab as previous one.
Also, In this case, you can move the changes using same way mentioned for issue 1.

These both issues will never occur if you maintain the version of managed solution.
While deploying changes to MS Dynamic CRM try to maintain the version of managed solution.You can avoid creating new solution each time.It will avoid many failures which occurs during solution import or the updates on entities.

To maintain version and version history using the ‘Description’ and ‘Version’ fields of solution Information.

ImportManagedSolution

IE 11 Compatibility Issues with CRM 2011

Hey Guys!

This article is useful for those CRM users who are using Microsoft Dynamics CRM 2011 version on their latest IE version.

What is the Issue?

CRM users encounter the problem with CRM views- which gets misaligned or does not load properly. CRM may crash sometimes if multiple windows are open. Overall slow performance is encountered by the users.

The Reason-

This basically happens due to compatibility issues between CRM and latest versions of IE.

Solution-

Just add the CRM URL to the compatibility mode!

Here are the steps that you can follow:

Step  1: Click “gear” icon on the upper right-hand side of your IE window.

Step 2: Select “Compatibility View Settings”

ie

Step 3: In “Add this website” text box, type your CRM URL (or simply copy & paste it!)

Step 4: Click “Add”& then “Close”.

Refresh the page. You should able to work normally.

PS: Above are steps for IE 11 version. There may be a slight difference in steps, between other versions.

I hope above article is useful for you!

Do comment if you have any questions.

Thank you!

 

 

MS Dynamics CRM Performance Diagnostics

What is the Issue?

CRM performance becomes very slow. But there is no clue what could be the reason behind slowness of CRM.

The Reason-

There might be several reasons to CRM performing very slow.
-Heavy customization on Entities
-APP Pool issue
-Asynchronous services performance
-Database issue
-Network related issues.

Solution-

Let’s see the solution for slow performance-
1.Heavy Customization on Entities-
-Try to make pages lighter by reducing the function calls on page load.
-If performance observed very slow on any event of some particular entity, check the workflows/plugins execution and try to make them asynchronous if possible. This will definitely improve the performance of your CRM.

2.Application pool issue-
-Sometimes there might be issue with application pool, which needs to be periodically recycled.

3.Asynchronous service Performance-
-This is the another issue which affects the crm performance. Restart the asynchronous service to resume/speedup the pending asynchronous workflows which are causing slowness in some operations.
-you can check here if you are facing some issue with asynchronous services-Asynchronous Processes/Wrokflows Stuck in InProgress/Waiting status in MS Dynamic CRM

4.Database issues-
-This is the common issue MS Dynamics CRM developer faces in a life. Due to heavy data loaded in database the crm might take time to perform operations like creating records, retrieving records, loading the views in some particular entity form. You can create indexes or recreate indexes if already exist, on such a tables which is having heavy load of data.  This will be improve performance more significantly.

5.Network Related issues-
-Very rarely user will face the slowness of CRM performance due to network related issues if they have some complex network structure, which causes the high latency in the network.
-In the case of NLB, slow performance issue might be observed by the CRM Users.In this case the you can check NLB settings.

MS Dynamics CRM provides the inbuilt diagnostics tool. You can use this tool to check point 1 and point 5.  You can use tool like-http://<YourCRMServerURL>/tools/diagnostics/diag.aspx

Another great tool that is built in tool available into CRM (2013 SP1 and up) is the CRM Performance Center. Try this with IE.
To activate,  log into CRM then press CTRL+Shift+Q on your keyboard. Click Enable, then click Refresh. When browsing in CRM, this will capture how long it takes components to load. This is a great alternative to tools like Fiddler and won’t require you to install additional third-party tools.

You can also refer-
Optimizing and maintaining client performance for Microsoft Dynamics CRM 2011 and CRM Online

Hope this will help you…