Blog
Dynamics 2020 Release Wave 1 JavaScript Updates
Dynamics 2020 Release Wave 1 JavaScript Updates
Each new release for Dynamics brings a host of new and useful functionality. Microsoft has dedicated serious resources to making sure Dynamics is a best of breed application that offers developers a robust tool set to improve business processes and end-user adoption. Microsoft recently announced the 2020 Release Wave 1, which you can learn more about by watching our recent webinar. This release is chock full of valuable tools, and two of the Dynamics 2020 Release Wave 1 JavaScript updates have me very excited as a solution to solving a common problem.
Problem: Entities as Option Sets
In developing custom solutions, we often come across the need for dependent option sets. A customer will have a requirement like, “If a user selects Manufacturing & Distribution from the Account Type option set, only display the related values in the Account Subtype option set.” We typically accomplish this with custom, related entities and lookup fields restricted to only display related records.
One of the downsides to this approach is that, up until now, end users have been able to click on the links in the lookup and navigate to the custom entity record itself, which was nothing more than a vanilla entity form with the name of the option set value. This is a negative experience for the end user and inhibits adoption. 2020 Release Wave 1 offers us some new JavaScript tools to improve this experience.
Overriding the onClick Behavior of a Lookup
First, 2020 Release Wave 1 includes new supported JavaScript that allows us to override the default onClick behavior of a lookup. This can be accomplished with code like:
function accountTypeClick(executionContext) {
executionContext.getEventArgs().preventDefault();
}
Once a user makes a selection for the Account Type or Account Subtype option set, any click on that chosen value will now do nothing, instead of navigating away from the Account record. More information can be found here: https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/events/onlookuptagclick
Opening a Modal Window onClick of a Lookup
The next tool that 2020 Release Wave 1 offers is the ability to replace that default behavior with opening the record in a modal window. Maybe the Account Type record contains valuable information that we want to expose to end users, but the experience of viewing it on a pop-up window would be worlds better than navigating away from the record. Once we’ve prevented the default behavior, we can use Xrm.Navigation.navigateTo to configure a modal window to pop up over the Account record and display the relevant information.
You can learn more about this functionality from Microsoft here: https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/customize-entity-forms#open-an-existing-record. Keep in mind that this is preview functionality and won’t work in environments that aren’t 2020 Release Wave 1 enabled.
Beringer is Here to Help with Dynamics 2020 Release Wave 1
The new features of 2020 Release Wave 1 are exciting and potentially useful, but they can also be overwhelming. If you’re having trouble sorting through the updates, potential implementations, or minimizing disruptions to your end users, reach out to Beringer Technology Group today. We have knowledgeable, experienced Microsoft-certified professionals ready to guide you through this update and beyond!
Beringer Technology Group, a leading Microsoft Gold Certified Partner specializing in Microsoft Dynamics 365 and CRM for Distribution. We also provide expert Managed IT Services, Backup and Disaster Recovery, Cloud Based Computing and Unified Communication Solutions.