Adding Buttons in the Ribbon – the Power Platform way!

So… back in old times we used to struggle with Ribbon Workbench for adding buttons in Dynamics 365 CRM. It was a nice way to do it but now we have an easier way out! Let’s welcome Power Fx Buttons!! 😀

  1. Add your desired entity (I will refer it as ‘Demo Entity’) in an App.
  2. Edit your App in Preview.

  1. Locate your entity (‘Demo Enity’) and click on the three dots to get the ‘Edit Command Bar (preview)’ option.
  1. Choose your desired selection and then click on Edit button. I am selecting Main Form.
  1. Click on New Command option. It will add a new button ‘NewCommand’. Rename it via the Label option in the right panel.
  1. You can add icon for your button from the same panel.
  2. Once you are done, click on Save and Publish button.
  3. For adding action to your button, select Run JavaScript from the Action Dropdown in the right panel.
  1. Define the Library and Function names , and your button is ready with the functionality.
  1. Here’s my nicely done button with icon on the Main Form.
  1. At times, I kept on getting a message Failed to delete component. Please delete the component from canvas studio. This was coming when I was changing the Action of the button. I simply reloaded the page and it was fine then. This might be a bug for the time being, as it is still in Preview mode. I hope it gets fixed before this is released officially.