Imagine the scenario, of after installing the Microsoft Dynamics CRM tablet app and entered credentials, you get an error of:

"Sorry, something went wrong while initializing the app. Please try again, or restart the app"

If you have already looked into this KB article http://support.microsoft.com/kb/2899860 and still it doesn’t help, try collecting logs and you may find errors referring to missing object reference from Ribbon as following:

 

Error Message:System.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.Crm.ObjectModel.RibbonConverter.RibbonControlToControlDescriptor(XmlNode control, ConversionType conversionType, Collection`1 selectionCommands, Boolean parentInSelectionCommands, Boolean contextual)

at Microsoft.Crm.ObjectModel.RibbonConverter.BuildCommandSet(XmlNode ribbon, Object commands, Object rules, Object displayRules, ConversionType conversionType, Collection`1 selectionCommands, Boolean contextual)

at Microsoft.Crm.ObjectModel.RibbonConverter.RibbonToCommandSet(XmlNode ribbon, Object commands, Object rules, Object displayRules, EntityMetadata entityMetadata, String pageContext, Boolean isGridItemContext, Collection`1 selectionCommands, Int32 languageCode)

at Microsoft.Crm.Application.Ribbon.RibbonXml.GetMobileClientCommandBarJson(RibbonPageContext pageContext, EntityMetadata entityMetadata, Int32 languageCode, IOrganizationContextEx context, Boolean isGridItemContext, HashSet`1 dependentWebResourceIds)

at Microsoft.Crm.Application.WebServices.ApplicationMetadata.ApplicationMetadataCommandSetConverter.Convert(ApplicationMetadataSourceObjectModel source)

at Microsoft.Crm.Application.WebServices.ApplicationMetadata.ApplicationMetadataSourceRetrieverBase.RegenerateApplicationMetadataRecords(IEnumerable`1 sourceObjectModels, Boolean createOrUpdateInDb)

at Microsoft.Crm.Application.WebServices.ApplicationMetadataService.Sync(ApplicationMetadataSyncRequest applicationMetadataSyncRequest)

 

One possible cause is the missing of an attribute in the custom ribbon definition. You can check this by:

1. Export customization

2. Open customization.xml >> Locate the entity having custom ribbons defined

3. Locate RibbonDiffXML and check whether or not the “LabelText” attribute is missing from custom ribbon defined for HomePageGrid, Subgrid or Main form as well as its corresponding entry in LocLabels tag

For example:

<Button Id="Sample.account.grid.SendToOtherSystem.Button" Command="Sample.account.grid.SendToOtherSystem.Command" ToolTipDescription="$LocLabels:Sample.account.SendToOtherSystem.ToolTip" TemplateAlias="o1" Image16by16="$webresource:sample_/icons/TIcon16x16.png" Image32by32="$webresource:sample_/icons/TIcon32x32.png" />

Solution

Add the missing LabelText for all the ribbon components in all managed and unmanaged solutions.

For example:

<Button Id="Sample.account.grid.SendToOtherSystem.Button" Command="Sample.account.grid.SendToOtherSystem.Command" LabelText="$LocLabels:Sample.account.SendToOtherSystem.LabelText" ToolTipDescription="$LocLabels:Sample.account.SendToOtherSystem.ToolTip" TemplateAlias="o1" Image16by16="$webresource:sample_/icons/TIcon16x16.png" Image32by32="$webresource:sample_/icons/TIcon32x32.png" />

This will also need the corresponding entry in LocLabels tag.

<LocLabel Id="Sample.account.SendToOtherSystem.LabelText">

<Titles>

<Title languagecode="1033" description="Send to Other System" />

</Titles>

</LocLabel>

Then save and reimport the customization. Verify that the issue has been resolved.

 

Best Regards

Dynamics CRM Support Team

Share this Blog Article on Twitter

Follow Us on Twitter