Redigera

Export, prepare to edit, and import the ribbon

Note

This topic is about classic commands.

There is a new way to define commands. See Modern commanding overview (preview).

This article explains how to edit the ribbon in model-driven apps by exporting a solution, preparing and modifying its XML, and then importing and publishing the customizations. Follow this process to apply ribbon changes successfully:

  1. Export the ribbon
  2. Prepare to edit the XML
  3. Edit the <RibbonDiffXml>
  4. Import the ribbon

Export the ribbon

You export the ribbon by including it in a solution and then exporting the solution. You can export all the customizations, but that option can represent a large amount of data. Use an existing unmanaged solution or create a new solution.

Create a new solution or edit an existing solution

Follow the instructions in Create a solution, or sign in to Power Apps and select Solutions from the left navigation. Select the unmanaged solution you want to edit.

If you want to edit the ribbon for specific tables, add those tables to the solution. For the purpose of editing table ribbons, you don't need to include required components. If you intend to export this solution and apply it to another system, include required components.

If you want to edit global ribbons or add a custom group to all tables, select Add Existing and then select Application Ribbons.

Export the ribbon

  1. Follow the instructions in Export a solution to download an unmanaged solution.
  2. Right-click the compressed .zip file that you downloaded and select Extract All... .
  3. Select a location to extract the files and then select Extract.
  4. Edit the customizations.xml file.

Prepare to edit the XML

For a better experience, edit the customizations.xml file with an application that uses schema validation to provide IntelliSense support. For more information, see Edit the customizations file with schema validation.

Import the ribbon

  1. After you edit the customization.xml file, select the folder that contains the file.

  2. Select all of the files or folders that were included when you extracted the solution. Right-click the selected files, select Compress to..., and then select ZIP File.

    Note

    This step creates a compressed .zip file in the same folder. The name of the file might vary, but it's the same as one of the other files in the folder - except it has a .zip file name extension.

  3. Follow the instructions in Import a solution.

  4. After you successfully import your solution, you must publish customizations before you can see the changes. In the solutions list menu, select Publish all customizations.

Resolve ribbon import errors

  1. If you receive a notification that errors caused the import to fail, select Export Log.

  2. Save the export log file. Select the file and right-click it. Select Open With and then choose Microsoft Office Excel.

  3. Select the Components worksheet and note any messages in the ErrorText column.

    Tip

    The most common type of failure is an error when referencing a dependent element in the RibbonDiffXml. You might have forgotten to include a LocLabel that was referenced somewhere. There might be an extra blank character at the end of an XML parameter referencing another element. All references must match exactly.

  4. After you correct the error, complete the steps to import the ribbon again.

Troubleshoot ribbon issues

If you're experiencing an issue with a ribbon command bar button, use the following articles in the troubleshooting guide to find and solve the problem.

See also

Customize the ribbon
Export ribbon definitions
Use localized labels with ribbons