Skip to main content

Notifications

Add a Custom Enable Rule to an OOB Ribbon

Overview

Today I will demonstrate how to add an Enable Rule to an OOB (Out of Box) ribbon.

Test Scenario:

For example, if the Account's Status Reason is Pending Approval on the Account form, then the + New Contact button in the Contact's sub-grid must be hidden. 

pastedimage1682685136197v1.png

Step 1: Open the Contact in the Ribbon Workbench

7080.pastedimage1682723336194v1.png

Step 2:  Locate the specific Ribbon 

You can find there are many many Add/New ribbons in the designer.

1104.pastedimage1682854062685v1.png

By using the F12 key to open the browser developer tool, you can find the ID of the desired ribbon and locate it.

0268.pastedimage1682854405073v2.png

Step 3: Locate the desired Ribbon->Right Click the OOB Ribbon->select Customise Button

5706.pastedimage1682854547218v3.png

Step 4: Select Add Enable Rule

4336.pastedimage1682854801875v4.png

Step 5:Add Step to the new Enable Rule

pastedimage1682723629880v4.png

Select CustomRule

pastedimage1682723784525v5.png

Detailed CustomRule

0763.pastedimage1682855128830v5.png

SourceCode detailed description

pastedimage1682857588087v9.png

Step 7: Confirm the newly added Enable Rule has been added to the desired Command 

0572.pastedimage1682855809440v6.png

Step 8: Publish

Step 9: Hard Refresh the Browser and  Test It

5554.pastedimage1682856977057v8.png

The other Ribbons for example Add Existing Contact ... can be customized in the same way.

The End

Comments

*This post is locked for comments