Uninstalling Managed Solution

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

  1. Avoid deleting it again while earlier process is still in work – Some times if you are not sure.
  2. Do not under-estimate the data deletion – Bulk deletion jobs might take long, so plan the deletion activity in advance
  3. 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.

Advertisements

Code review checklist

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…
  • Naming convention
Identifier Case Example
Enum values Pascal FatalError
Read-only Static field Pascal RedValue
Method Pascal ToString
Parameter Camel typeName
Property Pascal BackColor
  • No warnings must be there (as per the standard rule set being used)
  • No commented code is present
  • Comments
  • 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

Functional

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

Happy Coding!!

KB Article – user story

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.

Steps:

  1. Setup “Subjects”. Set very specific subjects so that they can be differentiated and cases can be classified easily.
  2. 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.
  3. 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.
  4. Add KB Article field below subject to make it easily accessible
  5. Now, include custom JavaScript(find attached in bottom) and enable function “RetrieveArticleForSubject” on change of subject field.

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