locked
The ribbon item is dependent on ribbon control. Error while importing unmanaged solution RRS feed

  • Question

  • Hi,

    Using Dynamics CRM Online, I am trying to remove the customization from the phone call ribbon that is returning an error while importing back to the unmanaged solution:

    The ribbon item 'cc.phonecall.MainTab.MyAction.Action.CustomAction' is dependent on ribbon control id='cc.Mscrm.Form.phonecall.MainTab.ProductName.Controls'.

    Although I am replacing the whole RibbonDiffXml block, the CRM is not allowing me import it back.

    Here is what I replaced the PhoneCall's RibbonDiffXml in the customizations.xml

          <RibbonDiffXml>
            <CustomActions />
            <Templates>
              <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
            </Templates>
            <CommandDefinitions />
            <RuleDefinitions>
              <TabDisplayRules />
              <DisplayRules />
              <EnableRules />
            </RuleDefinitions>
            <LocLabels />
          </RibbonDiffXml>

    That was previously defined as:


    <CustomActions> <CustomAction Id="cc.phonecall.MainTab.MyAction.Action.CustomAction" Location="cc.Mscrm.Form.phonecall.MainTab.ProductName.Controls._children" Sequence="10"> <CommandUIDefinition> <Button Command="cc.phonecall.Command.Playback" Id="cc.phonecall.MainTab.playback.play" Image32by32="/WebResources/cc_/images/play_audio.png" Image16by16="/WebResources/cc_/images/play_audio.png" LabelText="$LocLabels:cc.phonecall.MainTab.playback.play.LabelText" Sequence="10" TemplateAlias="o3" ToolTipTitle="$LocLabels:cc.phonecall.MainTab.playback.play.ToolTipTitle" ToolTipDescription="$LocLabels:cc.phonecall.MainTab.playback.play.ToolTipDescription" /> </CommandUIDefinition> </CustomAction> </CustomActions> <Templates> <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates> </Templates> <CommandDefinitions> <CommandDefinition Id="cc.phonecall.Command.Playback"> <EnableRules /> <DisplayRules> <DisplayRule Id="cc.phonecall.DisplayRule0.DisplayRule" /> </DisplayRules> <Actions> <JavaScriptFunction FunctionName="AddPlaybackTransactionNew" Library="$webresource:cc_DialogScript" /> </Actions> </CommandDefinition> <CommandDefinition Id="Mscrm.DeletePrimaryRecord"> <EnableRules> <EnableRule Id="Mscrm.FormStateNotNew" /> <EnableRule Id="Mscrm.CanDeletePrimary" /> </EnableRules> <DisplayRules> <DisplayRule Id="Mscrm.DeletePrimaryEntityPermission" /> </DisplayRules> <Actions> <JavaScriptFunction FunctionName="Mscrm.CommandBarActions.deletePrimaryRecord" Library="/_static/_common/scripts/CommandBarActions.js"> <CrmParameter Value="FirstPrimaryItemId" /> <CrmParameter Value="PrimaryEntityTypeName" /> </JavaScriptFunction> </Actions> </CommandDefinition> </CommandDefinitions> <RuleDefinitions> <TabDisplayRules /> <DisplayRules> <DisplayRule Id="cc.phonecall.DisplayRule0.DisplayRule"> <FormStateRule State="Disabled" Default="true" InvertResult="false" /> </DisplayRule> <DisplayRule Id="Mscrm.DeletePrimaryEntityPermission"> <EntityPrivilegeRule PrivilegeType="Delete" PrivilegeDepth="Basic" AppliesTo="PrimaryEntity" /> </DisplayRule> </DisplayRules> <EnableRules> <EnableRule Id="cc.phonecall.EnableRule0.EnableRule"> <ValueRule Field="cc_isrecordingavailable" Value="false" Default="false" InvertResult="true" /> </EnableRule> <EnableRule Id="Mscrm.CanDeletePrimary"> <RecordPrivilegeRule PrivilegeType="Delete" AppliesTo="PrimaryEntity" /> </EnableRule> <EnableRule Id="Mscrm.FormStateNotNew"> <FormStateRule State="Create" InvertResult="true" /> </EnableRule> </EnableRules> </RuleDefinitions> <LocLabels> <LocLabel Id="cc.phonecall.MainTab.playback.play.LabelText"> <Titles> <Title description="Playback" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="cc.phonecall.MainTab.playback.play.ToolTipDescription"> <Titles> <Title description="Play call recording" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="cc.phonecall.MainTab.playback.play.ToolTipTitle"> <Titles> <Title description="Playback" languagecode="1033" /> </Titles> </LocLabel> </LocLabels>



    [blog] http://technologynotesforyou.wordpress.com [skype] ali.net.pk




    • Edited by Khadim Ali Tuesday, December 2, 2014 2:07 PM
    Tuesday, December 2, 2014 1:18 PM

All replies

  • Hi,

    Try after replacing the RibbonDiffXml block with an empty RibbonDiffXml node (<RibbonDiffXml/>).

    ie..

    Add <RibbonDiffXml/> instead of the below block

    <RibbonDiffXml>
            <CustomActions />
            <Templates>
              <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
            </Templates>
            <CommandDefinitions />
            <RuleDefinitions>
              <TabDisplayRules />
              <DisplayRules />
              <EnableRules />
            </RuleDefinitions>
            <LocLabels />
    </RibbonDiffXml>


    Thanks,
    Seban
    Tuesday, December 2, 2014 2:13 PM
  • Hi Seban,

    Tried with <RibbonDiffXml/> only. Still failing to import. :(

    Thanks for your reply.


    [blog] http://technologynotesforyou.wordpress.com [skype] ali.net.pk

    Tuesday, December 2, 2014 2:38 PM
  • Hi Ali,

    did you ever find a solution to this? I'm having the same difficulty working with CRM on-premise.

    When I've faced this issue before Seban's fix worked for me.

    Thanks,

    John

    Tuesday, March 8, 2016 3:23 PM
  • Quick update, found a solution! use the following process to reset the ribbon, do this in a test environment first as there's a risk you might loose your entity customisations if it doesn't work for your scenario. Basically we're going to overwrite the whole entity from Vanilla CRM and then reimport your custimisations sans the components that refuse to import before rebuilding those components...

    1. Export a new unmanaged solution containing only the affected entity
    2. Export a new unmanaged solution containing only the affected entity from a vanilla (not customised) copy of CRM
    3. Modify the XML in that solution to remove the component that cuases the import to fail, and any components that are dependant on it
    4. Import the solution from vanilla CRM
    5. Import the solution that you fiddle'd with
    6. Rebuild the components that you removed from the XML earlier either with the Ribbon Editor or another solution import
    7. Delete temporary solutions

    HTH,

    John


    • Edited by DeadRabit Tuesday, March 8, 2016 5:36 PM forgot I'm not using a pseudonym
    Tuesday, March 8, 2016 5:35 PM