Author Archives: Jobin Mathews

Actions to improve performance in Microsoft CRM On Premise – 11 Checks

Performance is always a great concern for any CRM implementation and there are few key things need to consider when analyzing performance improvement. I thought it would be helpful if I summarize the basic key checks to be done to improve the performance in Microsoft CRM On premise deployment.

 

1. Check – Principal Object Access table size

One of the key reasons for performance issue in Microsoft CRM is the improper maintenance of its database which results in the huge number of records in POA table.

Proper actions need to be taken to clear the POA table as well as to control the growth of this table to get the system working smoothly.

Query to find the table count:

–Get the total number of shared records grouped by Entity
SELECT  EV.NAME AS [ENTITY NAME],COUNT(POA.OBJECTTYPECODE) AS [RECORDS COUNT]
FROM PRINCIPALOBJECTACCESS POA
INNER JOIN ENTITYLOGICALVIEW EV ON EV.OBJECTTYPECODE = POA.OBJECTTYPECODE
GROUP BY EV.NAME
ORDER BY 2 DESC

  1. Clean-up Principal Object Access

In order to clean-up this table, the following actions should be made:

  1. Schedule a Bulk Deletion Job which would delete all completed and cancelled ‘Workflow logs’
  2. Schedule a Bulk Deletion Job which would delete all completed and cancelled ‘Process Sessions’
  3. Execute Microsoft recommended SQL command to clear the records from AsyncOperationBase and POA tables https://support.microsoft.com/en-za/kb/968520
  1. Control records growth in POA table
  1. Set the option to delete workflow Log after the completion of Async plugins⁺ and in Workflows⁺
  2. Change the custom relationship behaviour from ‘Parent’ to ‘Referential’ or equivalent for the most affected relationships
  • ActivityPointer
  • Annotation
  • Incident

3. Build and schedule a weekly maintenance job to clear the completed and cancelled           workflow logs older than x months

 

2. Enable the ‘EnableRetrieveMultipleOptimization’ registry key

Details: http://support.microsoft.com/kb/2535245

Please note that enabling this will cause the queries to make use of temp tables

3. AsyncOperationBase table maintenance

Problem Statement:

The workflows in the Dynamics CRM organization are configured to log every successful execution. If there is no business need to audit on successful executions, the data logged should be avoided. Having huge number of records in AsyncOperationBase table will have impact on performance.

Resolution:

In order to maintain this table the following activities will be implemented:

  • Assess Workflow Job Retention option for all workflows
  • Schedule the Clean up task for cleaning the asynchronous table
  • Develop a query which looks for record count in the asynchronous table.
  • Review the automatic schedule job timings for clean up and change if required.

 

4. Check if schedule maintenance jobs are failing and need to be monitored and rectified

 

Problem Statement: If CRM maintenance jobs are not running in the system, this results in DB having huge number of orphaned and obsolete records which would affect the performance of the system.

Resolution:

There are schedule jobs running in the CRM app server which can be scheduled to run during the off-business hours.

Also ensure that the below listed maintenance jobs are running effectively in the system.

  • Deletion Service
  • Indexing Management
  • Reindex All
  • Cleanup Workflows

 

5. CRM database – sharing memory resources with other databases on the SQL instance

 

When the Dynamics CRM database(s) share resources with other databases, the performance will be impacted. Monitoring for usage of the machine vitals

(memory, disk IO, network, CPU) will help in determining the impact it is having on the performance on Dynamics CRM.

To ensure predictability, the Dynamics CRM database should not share resources

with other applications, databases or servers.

Resolution:

There should be plans to move non-CRM Databases to a different DB instance

as per the best practices.

 

6. Enable “Auto update statistics” settings for query optimization

This setting will check for indexes that require statistics update and update automatically and thus improve the performance

 

7. Optimize CRM built-in maintenance jobs with Indexes

Check if proper indexes are added in AsyncOperationBase table. If the index is missing in this table clean up activity will be delayed/failed

AsyncNoIndexError

8. To make use of “ExecuteMultiple” in bulk data update/create activities

ExecuteMultiple will work much faster compare to the “Execute” method as it will process requests in a batches [upto 1000 requests in 1 batch]

 9. Check if the “Business Unit” structure is implemented appropriately

Ideally “Business Unit” in CRM should be the backbone of the security model and thus the focus on using CRM business unit should be on designing the proper security model rather than business’s Business model. Creating huge number of CRM Business Units would also create x times Security Roles. Which will have an impact.

 

For eg: if the security requirement doesn’t need to segregate information across mulple functional Bus within the organizations, it doesn’t necessarily need to create CRM Business Unit. A custom Business Unit entity can be used to serve the purpose and hence reduce the load in CRM Business Unit structure.

 

10. Check for Higher Index Fragmentation in CRM Database

Having more number of fragmented indexes with average fragmentation count higher than 20 will have huge impact on SQL Server performance

11. Settings to improve the AsyncService performance

Better usage of the AsyncService settings would improve the load on SQL Server as well as the Async Server

Eg: Setting lower values for AsyncItemsInMemoryHigh and AsyncItemsInMemoryLow

 

This blog has the settings in more details:

http://www.powerobjects.com/2016/08/08/crm-asynchronous-service-performance-settings/

 

 

 

Unable to add Webresource/IFRAME in CRM 2016 Interactive Service Hub form – Resolved in Update 8.1

If you are using CRM 2016 [Version 8.0] and without Update 1 installed, you might notice that Interactive Service form doesn’t have option to include ‘Web resource’  and ‘IFRAME’ component which is a great drawback. Many users have complained about this and Microsoft has fixed this in Microsoft CRM 2016 Update 1 release.

ish-webresourcenew

You would now be able to include IFRAME components in Interactive Service forms.

How to create and configure Calculated field in CRM 2015

“Calculated Field” is a new feature introduced in CRM 2015 which can be used to store calculated values. The key benefit is, this can be setup from CRM UI without any code.

Let’s have a look at how to setup this field type and the scope of this field type in implementations.

Here the requirement is to create a field to calculate the number of days since the Account record is last modified and to display the value on ‘Account’ form as well as on ‘Active Accounts’ view.

Steps to create the Calculated field:

  • Setting up ‘Calculated Field’ is just like any other field in an entity and can be done from Settings>Customizations>Solutions ~ Components> Entities> {Entity} > Fields >New

Read the rest of this entry

How to create and configure Rollup field in CRM 2015

“Rollup Field” is a new feature introduced in CRM 2015 which can be used for setting up extended fields to store aggregated values. The key benefit is, this can be setup from CRM UI without any code.

Let’s have a look at how to setup this field type and the scope of this field type in implementations.

Here the requirement is to create a field to count the number of Opportunities in an Account which are in ‘Won’ status and add it to the Account form.

Steps to create the Rollup field: Read the rest of this entry

How to enable Business Rule to execute server side in CRM 2015?

In CRM 2015, there is a very important update which can be considered for replacing many workflows or plugins – Executing Business Rules from Server Side code.

 

When Business Rule feature was introduced in CRM 2013, it was capable of executing from client side alone and with the 2015 update, we now be able to execute business rule from server side as well- which is a great feature. Read the rest of this entry

‘First Response By’ and ‘Resolve By’ fields are not getting populated on case form for enhanced SLA

When you implement SLA feature in CRM 2015/2016 you might worry about these fields as they would be filled only based on the SLA type – ‘Standard’. You may remove the fields from the Case form depends on the SLA type (‘Enhanced’) you opt for the CRM setup.

 

If you enable the standard SLA, the below fields would be populated with values: Read the rest of this entry

How to set default Entitlement during Case Creation in CRM 2016?

Before CRM 2015 Update, users had to set the entitlement to a case record manually and as with the latest Microsoft CRM update, it can be automated.

 

An entitlement can be set as a ‘Default Entitlement’ for a customer and thereafter when a case is created for the customer, which entitlement will be assigned to the case automatically which saves service user’s time. Read the rest of this entry

How to setup Routing Rule in CRM 2016/2015/2013 Update

In versions prior to CRM 2013, an entity could only be routed to default queue of the owner of the record when record is created or assigned. For any other conditional routing, custom development was the way to go.

Now with CRM 2013 update and above versions, we can configure rules to automate routing of Cases. At the moment this feature is only available for Case Entity.

 

Create Routing Rule Set:

  1. Go to Settings->Service Management->Routing Rule Sets

1

2. Create a new Routing Rule Set. One Routing Rule Set can have multiple rule items. Provide the Routing Rule Set Name and save the record to create rule items under this rule set. Read the rest of this entry

How to upgrade a CRM 2015 multi-tenant deployment to CRM 2016?

By running the setup file for CRM 2016, you can upgrade one organization and rest of the organizations would be disabled automatically. After the successful upgrade of first Organization in the server, other organizations need to be upgraded from ‘Deployment Manager’.

 

In the current scenario, I have CRM 2015 server with two organizations ‘Demo’ and ‘Demo2’.

  • Select any Organization to be upgraded while running the CRM 2016 setup

1     2

  • Organization ‘Demo2’ alone is upgraded to CRM 2016. Organization ‘Demo’ is not upgraded to 2016 and is disabled automatically. It needs to be upgraded from Deployment Manager.

3

  • Open the ‘Deployment Manager’. Clicking on ‘Upgrade Organization’ will pop up the Upgrade Organization Wizard.

4

  • Select ‘Upgrade’

5

  • Organization ‘Demo’ is upgraded to CRM 2016

6

How to setup Hierarchy Security in CRM 2015?

Hierarchy Security is a new feature introduced in CRM 2015. It makes the security architecture of CRM 2015 more flexible.

Common facts about Hierarchy Security

Before explaining how to setup hierarchy security in CRM 2015, I would like to mention few facts about Hierarchy Security.

  1. You can enable or disable hierarchy feature anytime from Settings>Security>Hierarchy Security
  2. Hierarchy feature can either be enabled on Manager Hierarchy or custom Position Hierarchy – cannot be enabled on both at the same time
  3. Hierarchy Depth is being used to limit the levels of access
  4. A manager or supervisor would inherit Read, Write, Append and Append To access on records owned by direct reports or owned by teams where direct reports are members in it
  5. A manager or supervisor would inherit only Read access on records owned by indirect reports or owned by teams where indirect reports are members in it
  6. To gain access via hierarchy security on any entity, Manager or Supervisor should have at least user level read access on that entity
  7. If we wish to exclude any entities from Hierarchy security access, it can be done from Settings>Security>Hierarchy Security

HierarchySecurity.png

 

 

Read the rest of this entry