Ribbon Workbench for Dynamics 365 – Add Custom Button on Entity with URL Action
```htmlRibbon Workbench for Dynamics 365 – Add Custom Button on Entity with URL Action
Dynamics 365 provides extensive customization capabilities that allow organizations to extend the user experience beyond standard functionality. One of the most commonly requested customizations is adding a custom button to an entity form, grid, or command bar that opens an external URL, Power App, Power BI report, SharePoint page, or third-party application.
Ribbon Workbench is a popular community tool used to visually customize command bars and ribbons in Dynamics 365 through a drag-and-drop interface. It enables administrators and developers to add, modify, and control custom commands without manually editing Ribbon XML.
What is Ribbon Workbench?
Ribbon Workbench is a tool that allows developers to customize:
- Entity Forms
- Home Grids
- Subgrids
- Command Bars
- Ribbon Buttons
The tool provides visual ribbon editing capabilities and is commonly used to create custom buttons, commands, display rules, and actions.
Why Add a Custom Button?
Organizations frequently need quick access to:
Power BI Reports
Open dashboards directly.
SharePoint Documents
Navigate to document locations.
External Applications
Launch integrated business systems.
Power Apps
Open Canvas Apps.
Power Pages
Navigate to customer portals.
Internal Websites
Access company resources.
Example:
Customer Record ↓ Custom Button ↓ Open Customer Portal
Business Scenario
Suppose users open an Account record.
Requirement:
Account Record ↓ Click Button ↓ Open Customer Portal
Instead of copying URLs manually, users can click a custom ribbon button.
Prerequisites
Before starting:
Install Ribbon Workbench
Import Ribbon Workbench into Dynamics 365 and open it from a solution. Typical customization workflows involve importing the solution and then selecting the target solution inside Ribbon Workbench.
Create a Solution
Example:
CRM Customizations
Add:
Account Entity
or any target entity.
Step 1: Open Ribbon Workbench
Navigate to:
Solutions ↓ Ribbon Workbench
Select:
Your Solution
The entity command bar loads into the designer. Ribbon Workbench loads ribbon components from the selected solution and displays them visually for editing.
Step 2: Locate Entity Ribbon
Example:
Account Entity
Select:
Form Ribbon
or
Home Grid Ribbon
Depending on where the button should appear.
Step 3: Add New Button
From the Ribbon Workbench toolbox:
Buttons ↓ Drag Button ↓ Drop on Ribbon
Configure:
Label
Open Portal
Tooltip
Open Customer Portal
Icon
Portal Icon
Ribbon Workbench supports assigning custom 16x16 and 32x32 images for command buttons.
Step 4: Create a Command
Every button requires a command.
Create:
OpenPortalCommand
Commands define what happens when users click a ribbon button.
Step 5: Configure URL Action
Add:
URL Action
Example:
https://portal.contoso.com
When users click:
Open Portal
The URL opens automatically.
Ribbon actions can invoke URLs or JavaScript functions and can pass contextual information through parameters.
Step 6: Pass Record Information Dynamically
Many scenarios require passing record data.
Example:
https://portal.contoso.com/customer?id=
Append:
AccountId
Result:
https://portal.contoso.com/customer?id={GUID}
The portal opens the correct customer record.
Ribbon actions support passing contextual information such as selected records, entity names, and form context using CRM parameters.
Example URL
https://portal.contoso.com/customer?id={AccountId}
Output:
https://portal.contoso.com/customer?id=6A7D1234
Users are redirected to the corresponding customer page.
Step 7: Configure Display Rules
Display rules control button visibility.
Example:
Show button only when:
Status = Active
or
Form Type = Existing Record
Dynamics 365 ribbon customization supports display rules based on form state, entity properties, user privileges, and client type.
Step 8: Configure Enable Rules
Enable rules determine whether the button is clickable.
Example:
Record Owner = Current User
or
Status = Active
If conditions fail:
Button Disabled
Step 9: Publish Changes
Click:
Publish
Ribbon Workbench updates command definitions and deploys the customization.
Example Workflow
Account Record ↓ Custom Button ↓ Pass Account ID ↓ Open URL ↓ Customer Portal Opens
Open Power BI Report
URL:
https://app.powerbi.com
Custom Button:
View Dashboard
Users access reports directly from CRM.
Open Power Apps
URL:
https://apps.powerapps.com/play/APPID
Custom Button:
Open Power App
Launch a Canvas App from Dynamics 365.
Open SharePoint Folder
URL:
https://contoso.sharepoint.com/sites/projects
Custom Button:
Open Documents
Users access project documents instantly.
Advanced Scenario
Pass Multiple Parameters
Example:
https://portal.contoso.com
?accountid={AccountId}
&name={AccountName}
Workflow:
Record Open ↓ Button Click ↓ Pass Record Data ↓ External Application
Using JavaScript Instead of Direct URL
Some scenarios require additional logic.
Command:
JavaScript Function
Example:
function OpenPortal(id)
{
window.open(
"https://portal.contoso.com?id=" + id
);
}
Ribbon commands can invoke JavaScript and receive form context parameters such as PrimaryControl for accessing record information.
Real-World Example
Customer Self-Service Portal
Entity:
Account
Button:
Open Portal
Action:
Pass Account ID
Result:
Customer portal opens directly for the selected account.
This eliminates manual searching and improves productivity.
Best Practices
- Use Display Rules
- Show buttons only when required
- Use Enable Rules
- Prevent invalid actions
- Pass Dynamic Parameters
- Avoid hardcoded values
- Use Secure URLs (HTTPS)
- Test Across Environments
- Validate URLs after deployment
- Use Solution-Based Deployment
Ribbon Workbench vs Modern Command Designer
Modern Dynamics 365 also provides Command Bar customization capabilities directly in Power Apps. However, Ribbon Workbench remains useful for advanced scenarios and legacy command customizations.
| Feature | Ribbon Workbench | Modern Command Designer |
|---|---|---|
| Legacy Ribbon Support | Yes | Limited |
| Advanced Customization | Yes | Moderate |
| Drag-and-Drop Design | Yes | Yes |
| JavaScript Commands | Yes | Yes |
| URL Actions | Yes | Yes |
| Legacy CRM Support | Yes | No |
Benefits
- Faster Navigation – Access external systems instantly.
- Improved User Experience – Reduce manual navigation.
- Better Productivity – One-click access to business applications.
- Seamless Integration – Connect Dynamics 365 with external systems.
- Flexible Customization – Support any URL-based business process.
Common Use Cases
- Customer Portals
- SharePoint Integration
- Power BI Reports
- Power Apps
- Internal Applications
Conclusion
Ribbon Workbench remains one of the most powerful tools for customizing Dynamics 365 command bars and ribbons.
By adding custom buttons with URL actions, organizations can integrate Dynamics 365 with Power Apps, Power Pages, SharePoint, Power BI, and external business applications while improving user productivity and simplifying navigation.
Whether you need to open reports, portals, document libraries, or third-party systems, custom ribbon buttons provide a flexible and user-friendly solution for extending Dynamics 365 functionality.
```