This could be an ongoing topic ever, You have to check health of your CRM on regular basis and/or every time new development is done certain checks should be made. In current Agile world when Business takes very short time to change process software must adapt and frequent changes are desired. There is possible negligence of long term impact causing performance issues.
This could be nightmare for any product owner, technical architect to find the real cause of performance issue. Here list of some standard issues that we investigated and improved upon
- Improve workflows that may cause delays
- Longer workflows with too many steps, can be replaced by plugins with few lines.
- Clean up waiting workflows
- Automatic deletion of completed items
- Java Scripts with synchronous calls
- Loops within Scripts that make sync calls(this is worst programming)
- Multiple plugins on same event with Synchronous steps(Try to combine them and call from one plugin)
- This becomes problem, when developers do not want to touch existing code 🙂
- Late binding server side plugins are faster that early binding.
- Third party API services, latency and response from other system is key here.
- Calls made from plugins/custom workflows to external system, this can cause delays in internal processes
- Calls made by external system to CRM, make sure to create staging entity to collect any data and process them in batches in background.
- Enable Compression in IIS(On premise)
- The reason for our issue was OLEDBTImeout !!! Yes because the OLEDBTimeout was 30 sec the deletion jobs were timing out.(OnPremise)
There can be other reasons and possible solutions, feel free to write to me to discuss more ideas you may have.
Since last few days I have been trying to delete one Managed Solution, its a Salesforce Connector for Microsoft Dynamics CRM (2016). ExactTarget Solution
Here are my notes on approach and resolution
- Custom stuff – first target
- Any unsupported customization, scripts, plugin steps registered on having the fields from the target solution.
- Drop Indexes and statistics that use custom entity attributes
- Create a new Solution as play area to add/remove items to check dependencies
- Add All entities to another solution, it will show all other entities where there is relationship to, so go ahead and remove them one by one.
- You may want to disable all WFs, some times there are specific Bulk deletion jobs also.
- Add all web resources and for each one check dependencies – Remove/Replace them
- In our case we had used a custom JS file on default entities.
- Before you start removing stuff, make sure to check Timeout settings
- After initial rounds we realized that its timing out while deleting even few thousand records because too many indexes were added
- Increase timeout to suit your infrastructure (This is only applicable for On-Premise)
- Delete all data that is for custom entities from the managed solution
- During uninstall, it failed several time and the reason was timeout to clear data. We had custom Activity as one of the entity with just 70k records but it was taking time.
Data gone, dependencies removed, you are all set to delete solution. If you still find anything keep removing it step by steps.
Some final tips
- Avoid deleting it again while earlier process is still in work – Some times if you are not sure.
- Do not under-estimate the data deletion – Bulk deletion jobs might take long, so plan the deletion activity in advance
- Trace log – Event log is not useful, At times it becomes necessary to enable trace and monitor it when you see repeated failed attempts with no reason for it.
Feel free to share your ideas.
Below is a small/quick list for Code reviews. (We have mainly used it for Dynamics CRM plugins/custom workflows development, but same can be applied for other .net projects)
Technical – In context of methods being modified/created for current changes
- Validate for below
- Database retrieve/query operation that can be avoided, if data is already available or can be collectively retrieved. (Very important because for performance)
- Multiple/unwanted loops for same collection in a method
- More checks can be added here…
|Read-only Static field
- No warnings must be there (as per the standard rule set being used)
- No commented code is present
- Methods must have comments, preferably referencing and matching the algorithms and logic provided in the design
- Check spelling mistakes in method names/comments
- Defect number, CR number should not be referenced in code
- Press Ctrl+K+D (code formatting) to check if code document is formatted properly
Verify the code as per the requirements (document)
- For each functionality required there should be code with appropriate comments
- Check if the logic implemented matches with requirements mentioned
- Compare new changes with existing, validate if only required code is changed
Recently we suggested client to start using KB Article for Cases. There are many articles available for “configuring KB articles” but not much on actually using it, as use cases defers from client to client. Here we would like to share simple yet very effective use of KB Article.
KB article field is already available in case(incident) entity. Below is how we suggested to use this.
- Setup “Subjects”. Set very specific subjects so that they can be differentiated and cases can be classified easily.
- Setup KB Articles as per business use. We recommended to have 1 article per subject which will include details on how to handle the case for selected subject.
- Remove existing KB Article section from case, as it takes more space and it resides in bottom. Also reading all the content by scrolling may not be the best approach.
- Add KB Article field below subject to make it easily accessible
So now as soon user selects Subject for the case, available article(published) for the selected subject will get selected in KB article field and users can click to open article in new window. This allows them to continue to work on case and update data and in another window read KB article details.
By using the approach, agents/support team members should be able to get related information quickly.
Code – Find attached file.RetrieveArticleForSubject