The ribbon item is dependent on ribbon control id

The ribbon item 'MSCRMAssistancePSA.invoice.grid.ApproveGroup.Approve.CustomAction' is dependent on ribbon control id='AssistancePSA.invoice.grid.ApproveGroup.Controls'

I encountered this issue on Invoice entity. The invoice entity was referencing a PSA button which was a part of a third party solution installed in CRM. We had uninstalled this managed solution previously, but the invoice was still referencing this button on a hide action, and hence was not able to publish or import any customization. You cannot delete this hide action.

<HideCustomAction Location="AssistancePSA.invoice.grid.ApproveGroup.Button.Approve" HideActionId="MSCRMAssistancePSAAssistancePSA.invoice.grid.ApproveGroup.Button.Approve.HideAction" />

The location is the PSA button id it is referencing.

I followed this article. It was confusing. It did not directly help in solving the issue, but the idea was valid.

I followed the following approach to solve the issue.

1. Create a new solution, add only the invoice entity, without the data sets.

2. Export the solution and take a backup copy.

3. Open customizations.xml file, replace the following code between the RibbonDiffXml element. I was missing two references, hence the two buttons.

          <CustomAction Id="AssistancePSA.invoice.grid.ApproveGroup.Button.Approve.CustomAction" Location="Mscrm.Form.invoice.MainTab.Actions.Controls._children" Sequence="6">
              <Button Id="AssistancePSA.invoice.grid.ApproveGroup.Button.Approve" LabelText="$LocLabels:AssistancePSA.invoice.grid.ApproveGroup.Button.Approve.LabelText" Sequence="6" />
          <CustomAction Id="AssistancePSA.invoice.grid.ApproveGroup.Controls.CustomAction" Location="Mscrm.Form.invoice.MainTab.Actions.Controls._children" Sequence="7">
              <Button Id="AssistancePSA.invoice.grid.ApproveGroup.Controls" LabelText="$LocLabels:AssistancePSA.invoice.grid.ApproveGroup.Controls.LabelText" Sequence="7" />
          <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
          <TabDisplayRules />
          <DisplayRules />
          <LocLabel Id="AssistancePSA.invoice.grid.ApproveGroup.Button.Approve.LabelText">
              <Title description="Approval" languagecode="1033" />
          <LocLabel Id="AssistancePSA.invoice.grid.ApproveGroup.Controls.LabelText">
              <Title description="Approval" languagecode="1033" />

One important piece of information to remember is the location attribute. The location attribute references the location of the button. In this case, the button with the id 'AssistancePSA.invoice.grid.ApproveGroup.Button.Approve' will be displayed on the main tab (Mscrm.Form.invoice.MainTab) within  the 'Actions' group. You can locate this on the Ribbon Workbench on any existing button. I was making a mistake here repeatedly which kept me lingering on to this issue for few hours. You must add a button a label, all the remaining elements are optional.

However, if you have existing customization in place for a ribbon, the idea is still the same, you just need to create the controls you are missing.

4. Save and import the solution back to CRM.


Post a comment