Category Archives: Microsoft Dynamics
Useful information about Microsoft Dynamics CRM. Best coding practices in Dynamics CRM.
For any CRM implementation, Customer 360 view is an inevitable component client would ask for or expect to include even if not mentioned explicitly. Though the client requirement is often a one liner “Need Customer 360 View in place”, most of the times CRM analyst has to do lot of Q&A sessions to conclude what to include and what not to. And, most of the times. it is confusing for the CRM development team what/where to show right information in the Customer 360 View and end up having too much information on the form which is a downfall.
Here we are going to explain what “Customer 360 view ” really means and the key aspects of having it:
Below are the samples of customer 360 view wireframes: Web and USD
“Editable Grid” is a significant feature and surprisingly it has been delayed to introduce in Microsoft CRM. Though it has been released in the online version way before, Microsoft has just introduced it in the On Premise version – Dynamics 365 Update 2.1 (On Premise).
By Default “Editable Grid” would be disabled and it has to be enabled manually through solution configuration – for each entity.
Here is how we can configure the “Editable Grid” for case entity in CRM.
- Open a solution which has case entity added (or create a new solution and add case entity to the solution)
Microsoft has published the latest update for CRM – Dynamics 365 Update 2.1 and is available to download.
If you need any assistance upgrading your current implementation, please contact us. We would be happy to help you assisting in your Dynamics CRM implementation.
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
- Clean-up Principal Object Access
In order to clean-up this table, the following actions should be made:
- Schedule a Bulk Deletion Job which would delete all completed and cancelled ‘Workflow logs’
- Schedule a Bulk Deletion Job which would delete all completed and cancelled ‘Process Sessions’
- Execute Microsoft recommended SQL command to clear the records from AsyncOperationBase and POA tables https://support.microsoft.com/en-za/kb/968520
- Control records growth in POA table
- Set the option to delete workflow Log after the completion of Async plugins⁺ and in Workflows⁺
- Change the custom relationship behaviour from ‘Parent’ to ‘Referential’ or equivalent for the most affected relationships
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
Please note that enabling this will cause the queries to make use of temp tables
3. AsyncOperationBase table maintenance
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.
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.
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.
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
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:
Microsoft has announced the Microsoft Dynamics 365 Dec 2016 Update (CRM) with the exciting new features and bug fixes
- Editable Grid
- Concurrently running Business Processes
- Interactive Service Hub enhancements
- Email engagement
- Mobile App enhancements
- Dynamics 365 App for outlook enhancements
Link to download the update: https://www.microsoft.com/en-us/download/details.aspx?id=54515
Link to the KB article on the update: https://www.microsoft.com/en-us/dynamics/crm-customer-center/what-s-new.aspx
Stay tuned for more details in coming days..
Strange Error while scheduling Service Activity in CRM 2016 – An Error Has occurred. Please return to homepage and try again.
An error while scheduling the service activity [Alert popup – not a usual error popup in CRM 2016]
“An Error Has occurred. Please return to homepage and try again.”
Root Cause for the error:
On the Service Activity form, there is a field ‘All Day Event’ which was removed from the form. This has caused the issue.
Adding the field “All Day Event’ back to the form resolved the issue! Strange!!
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.
You would now be able to include IFRAME components in Interactive Service forms.
If you are experiencing the error ‘Unable to login to Dynamics CRM’ while generating the CRM Proxy class using CrmSvcUtil tool, you should try this to resolve it.
There is a new command parameter added to the CrmSvcUtil tool : interactivelogin:true
You may append this command parameter to your CrmSvcUtil command line and this would give you a pop up to enter the credentials and would sort the above mentioned issue.
Your command would look like:
CrmSvcUtil.exe /url:<Server url>/<Organization> /username:<username> /password:<pwd> /domain:<domain> /out:”Xrm.cs” /namespace:Xrm /serviceContextName:CrmContext /interactivelogin:true
Interactive Login popup window:
In enterprise solution scenarios, it is very much required to integrate CRM online with on premise line of business applications. Microsoft Azure Service Bus is used to facilitate integration between CRM online and ‘on premise’ line of business applications.
This article describes the steps to configure azure service bus queue for CRM online integration.
Steps to configure service bus queue for CRM.
- Add azure account using PowerShell command: Add-azureaccount
Below popup will be displayed to enter credentials.
After providing valid credentials, below details will be shown in the window
2. Create azure namespace using below PowerShell command
New-AzureSBNamespace –Name YOUR_NAMESPACE -Location “YOUR_LOCATION” -NamespaceType Messaging -CreateACSNamespace $true
The supported locations are: Central US, East US, East US 2, North Central US, South Central US, West US, North Europe, West Europe, East Asia, Southeast Asia, Brazil South, Japan East, and Japan West.
After successful creation of service bus namespace, below details will be shown in the screen:
3. Login to azure portal using same credentials and navigate to “Service Bus” as mentioned below:
4. Click service bus namespace and navigate to Queues as mentioned below:
5. Click “Create A New Queue” option:
6. Select Quick Create option and provide Queue name, Region and namespace (namespace should be same the created service bus namespace name). Then click “Create a new queue” button:
Azure service bus queue created as shown below:
7. Login to Plugin registration tool and select Register New Service Endpoint option:
8. Provide the details of service bus namespace and service bus queue same as the one created.
9. To configure ACS, Details of Issuer Name, Certificate File and Management Key required.
These details can be obtained from below steps:
- Login to CRM
- Navigate to Settings->Customization->Developer Resources
- Note down Issuer name and download Certificate as given below image:
Management Key (Default Key) can be obtained from azure portal.
- Login to azure portal and navigate to Service bus ACS details
- Note down the Default Key as mentioned in below image
10. Click “Save and Configure ACS” button from Plugin registration tool:
Provide the Management Key, Certificate File and Issuer Name
11. Click configure “Configure ACS”, then Press “Yes” to the popup as mentioned below:
12. After successful configuration, click close. Then click “Save and Verify Authentication” button in plugin service endpoint registration screen:
13. Plugin step can be registered to any of the CRM entity to verify the message publish to queue
Configuration for CRM online integration with service bus queue is ready now. After successful update of CRM lead record, data from CRM pushes to service bus queue.
On premise line of business applications can get the service bus queue data by consuming the service bus queue listener component and enable the integration with CRM.
Data in service bus queue can be verified by using “Service Bus Explorer” tool as shown below images:
Ticker Symbol is a one of the formats of field type ‘Single Line of Text’ in Microsoft CRM.
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