KTL SOLUTIONS

Where do Value Based Enable Rules get their data for the CRM 2013 ribbon?

Share this post

A recent request tasked me with adding functionality to the form ribbon of an Order in CRM 2013. The goal was to capture information from two fields on the Order’s associated Account and based on that information enable or disable a button on the ribbon of the Order which for the purposes of this article we can call Has_Value. I was not able to pass the values to the Order when it was created as these values could change some time after it had been created. Additionally, if the associated Account were found to be a duplicate, it would have to be merged and updated on the Order that could also change the results of the information I was capturing. This left me with having to query for my information using Javascript when the Order form loaded. With this Javascript query, I then updated a hidden Boolean field on the Order if the criteria was met or left it blank if it was not. This might not seem important now but having to take these actions in order to meet the requirements affected how this customization had to be modified at later steps in the functionality.

I thought I had everything down to perfection. I was able to query the information I wanted and left it flexible enough be updated with any potential changes that might occur on the associated Account or Order itself. Now all I had to do was trigger my button based on the value in my recently updated Order field. Using the Ribbon Workbench, an excellent tool created by Scott Durow (and in my opinion a must have for easy customization of the CRM ribbons), I created an enable rule on the ribbon button as a value rule to capture my Has_Value field.

Unfortunately, upon testing I found that my creation had failed and was not showing my button despite the Has_Value field updating on the form. I even added a script to refresh the ribbon at the onChange of my Has_Value field which I visually could see was changing and causing the ribbon to refresh. So why was my enable rule not showing the button?

I contacted Microsoft Support and went through a few hours of troubleshooting which finally resulted in them having to do additional testing on their end. Thankfully they were able to come back with a reason why I was having issues. Apparently in CRM 2011, when using a value based enable rule, the data was collected client side but now in 2013 the enable rule is looking server side for value rules. With this information I changed my value rule to a custom rule using Javascript to get the value from the form being used and pass that on to the enable rule. After making this tweak the button appeared and was hidden as it was intended.

Despite my value being changed by the Javascript on my form, the information did not reflect that on the server preventing my value rule from allowing me to update the enable rule in real time. Just remember when working with the value rule on an enable rule that CRM is looking to the server for that information.

For more information on customizations in CRM contact KTL Solutions at 301.360.0001 or email Scott at sales@ktlsolutions.com


SCOTT FLORANCE | CRM Business Software Consultant

Scott Florance is one of the CRM Consultants at KTL and has proven his value as a member of the team since September 2013. Whether implementing a new CRM organization or adding to existing configurations, Scott has engaged clients with a positive and enthusiastic demeanor to help them meet their organizational needs. With four plus years of experience, Scott is familiar with CRM as both a power user and administrator. Scott received his bachelor’s degree in business administration from the University of Central Florida. He is a Microsoft Certified Technology Specialist for Dynamics CRM as well as a Certified Scribe Technician.

Related Posts

Checking Your CMMC Progress

Written by Alec Toloczko With Cybersecurity Maturity Model Certification (CMMC) requirements on the horizon, it’s crucial for organizations handling Controlled Unclassified Information (CUI) to adhere

Read More »