In our implementation, we have removed the upgraded ISV tab (KB 2501761) and added a custom tab in the ribbon. This customization is part of an unmanaged solution that we move through different environments. This tab is showing up as the default selected tab in the ribbon. It does not do this in every environment. Incidentally we have another custom tab in a managed solution that has this same behavior. It is not consistent. We have a support ticket open with Microsoft. While they are looking into this for us, we have done some snooping on our own. Here are some of our findings:
- Using ILSpy shows CRM Server code is setting the InitialTabId to the first tab in its cache
- The order of the tabs in the cache is based on the order of records in the RibbonRuleBase table
- The order of the records in the RibbonRuleBase table is based on its index, namely on the order of the RibbonRuleId column
- Changing the value of the RibbonRuleId to be a value higher than the ID of the ribbon rule for the system tabs will resolve the issue (unsupported)
- The RibbonRuleId appears to be a sequential unique ID supported by rampant use of the UuidCreateSequential method in CRM code from the rpcrt4.dll assembly.
- Sequential IDs typically increment to greater values but may generate lower values once the server is restarted.
We have reported these findings (with great detail) to Microsoft and await their feedback. I will try to post back here with the final outcome. On a side note, if our findings are correct then I'd be very hesitant to use the secret registry setting (TurnOffSequentialGuid). I would imagine that would make it more likely for a RibbonRuleId to generate with a value that would elicit this behavior.
Matt Poland - Manager of Application Development