Reputation: 488
We are trying to import a solution from an org A to an org B such that the ribbon changes made in the org A is not imported. While adding an entity to a solution in org A, we excluded the metadata and added the entity. While exporting this solution from org A and importing it to org B, the ribbon changes made in the entity in the org A replaces all the ribbon changes made to the same entity in the org B.
Is there a way such that the ribbon changes are not included in the solution?
Upvotes: 2
Views: 2822
Reputation: 29971
Using the SolutionPackager.exe you can exclude the ribbon.
<RibbonDiffXml />
NOTE: You will need to do this every time you export
Upvotes: 0
Reputation: 5787
You cannot exclude the ribbon from an entity when exporting in the solution. What you can do is to exclude the global ribbon definition (Solution -> Client Extensions -> Application Ribbons).
I suggest that you remove your changes to the local ribbon of your entity, and instead make a global ribbon customization that targets only the entity you are interested in. If you then exclude the Application Ribbons from your solution, the change will stay behind in your source environment.
You can edit the global ribbon by adding Application Ribbons to a solution:
You would then find the global <RibbonDiffXml>
in customizations.xml
(located at the very end of the file). There you add the needed XML using the {!EntityLogicalName}
placeholder. Finally you can use a DisplayRule to ensure that only your specific entity has the ribbon button shown:
<DisplayRule Id="My.DisplayRule">
<EntityRule EntityName="myEntity" Context="Form" />
</DisplayRule>
Upvotes: 1
Reputation: 22836
Unfortunately, Ribbondiff
xml of Entity Metadata definition is not a sub-component that can be segmented as a part of solution yet.
In other words, there is no granularity to skip the ribbon changes only using solution between environments. Ribbon always goes.
One workaround is to open the CRM ribbon workbench, copy the xml as a backup from Org B. After moving the entity solution from Org A to Org B, paste the backup xml into Org B to restore/publish.
Upvotes: 2