Category Archives: Microsoft CRM 2013

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/

 

 

 

What is ‘Ticker Symbol’ field format in Microsoft CRM?

Ticker Symbol is a one of the formats of field type ‘Single Line of Text’ in Microsoft CRM.

 

1

This is a kind of text field which stores the value as string but clicking on this field value would open the ‘MSN money page’ [Stock Market details] for the text in the field value. Read the rest of this entry

MB2-700 Dynamics CRM 2013 Applications Certification Helper – Question#1

Which two record types require a reference to the subject tree? Each answer presents part of the solution. (Choose TWO)

A. Sales Attachments

B. Case Resolution Activity

C. Cases

D. Sales Literature

E. Knowledge Base articles

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

Unable to get property ‘firstChild’ of undefined or null reference – Error accessing Microsoft CRM

You might have received this annoying popup error while accessing Microsoft CRM. You might wonder if there is anything wrong with the Jscript customization in your solution! This is actually a browser related problem and you can fix it quickly.

Resolution: Add the CRM url to the ‘Trusted sites’ list and you would not get this issue. Its related to the activex control access.

Changing parent BU removes security roles assigned to the users of that BU – Issue fixed in CRM 2015

There was a strange issue in CRM 2011 where the security roles of users part of a BU get removed when the BU’s parent BU is changed. This issue seems like fixed by Microsoft in CRM 2013 RU2 and we do not see that issue in CRM 2015 either.

 

If you are still using CRM 2011 and are affected with this issue, a work around would be to reassign the security roles through custom code or from UI after the parent BU change.

Through Code:

<pre>// Associate the user with the role.
        if (_roleId != Guid.Empty && _userId != Guid.Empty)
        {
            _serviceProxy.Associate(
                        "systemuser",
                        _userId,
                        new Relationship("systemuserroles_association"),
                        new EntityReferenceCollection() { new EntityReference(Role.EntityLogicalName, _roleId) });

            Console.WriteLine("Role is associated with the user.");
        }</pre>

How to set and clear field notification in CRM 2013 using JScript – CRM 2013 Feature

There is a new client API  feature introduced in CRM 2013 – Setting Form and Field level notifications through Jscript.

Let’s have a look at how to set notification on a field on Account form.

The requirement is to check and notify if Phone field on the account form is empty.

Sample Code has been added to OnSave() event of Account:


function AlertOnAccountForm() {

    //Set Field Notification
    if (Xrm.Page.data.entity.attributes.get('telephone1').getValue() == null) {
        Xrm.Page.getControl('telephone1').setNotification('Phone Number should not be empty');
    }

}

And the UI will be like this on save of account form:

Field notification

How to set form notification in CRM 2013 using JScript – CRM 2013 Feature

There is a new client API  feature introduced in CRM 2013 – Setting Form and Field level notifications through Jscript.

Let’s have a look at how to set the form notification on the Account form.

We will be using the new Xrm.page.ui.setFormNotitication() method to achieve this.

Xrm.Page.ui.setFormNotification(message, level, uniqueId);

Parameters

message | Type: String. The text of the message.

level | Type: String. The level of the message.

The level defines how the message will be displayed.

  • ERROR : Notification will use the system error icon.
  • WARNING : Notification will use the system warning icon.
  • INFO : Notification will use the system info icon.

uniqueId | Type: String. A unique identifier for the message used with clearFormNotification to remove the notification.

Sample Method which calls this method – registered on the OnSave() event of Account form

function AlertOnAccountForm() {
 Xrm.Page.ui.setFormNotification('Sample Error Notification message for Demo ', 'ERROR', '1');
 Xrm.Page.ui.setFormNotification('Sample information Notification message for Demo ', 'INFORMATION', '2');
 Xrm.Page.ui.setFormNotification('Sample Warning Notification message for Demo ', 'WARNING', '3');&nbsp;}

And the form UI will be like this:

FormNotofication_screen

Read the rest of this entry

Unable to enable .Net Framework 3.5 in Windows Server R2 Update – CRM 2013 installation blocker

As part of installing CRM 2013 for one of our clients we have faced an issue where we couldn’t enable .Net Framework 3.5 in windows server 2012 R2. Here is why and what did we do to fix it.

possible reasons:

  1. Windows Server R2 Update might have the security update 2966827 or 2966828 already installed in the server and this would block enabling .Net Framework 3.5.
  2. Internet connection in server is not working

In case of reason#1 – you may uninstall security update  2966827 or 2966828 and try to enable .Net 3.5

 

In case of reason#2 – you can select the alternate source path which has the windows server R2 source files to install .Net Framework 3.5

Steps to follow:

Step 1. Select  ‘ Specify alternate source path’ while adding .Net 3.5 feature

Add Roles And Features-Net3_5

Step #2: provide path to the source folder [usually <Image drive>:\Sources\SxS ] and continue with the feature enabling. This should work.

Add Roles And Features-Net3_5_2

 

 

MB2-703 CRM 2013 Customization and Configuration Guide explained – Question#6

Question #6:

 

You are creating a custom entity.

Which three communication and collaboration features can be disabled after they are enabled? Each correct answer presents a complete solution.
A. Sending email

B. Access Teams

C. Document management

D. Mail merge

E. Notes

 

Answer: Once the entity is created and the features are enabled, ‘Sending Email’ feature as well as ‘Notes’ feature cannot be disabled. Features like ‘Access Teams’, ‘Document Management’, ‘Mail Merge’ can be disabled after they are enabled.

crm_customization_image

+symbol

Answer to this question would be options B,C & D