Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications

| |

How to Disable JavaScript in Dynamics 365 Apps

Post Author: Joe D365 |

JavaScript is a great tool for adding functionality into Microsoft Dynamics 365 and many users commonly use it. However, while JavaScript works great within browsers, when utilizing the Dynamics 365 apps for mobile, certain JavaScript code may cause errors within the application.

While one option may be to review the code to resolve errors, there may be circumstances where the code is simply not compatible or is not required in the mobile app. In this situation, you can add a small line of code to a JavaScript function to disable the code from running on mobile.

Simply add this 'if statement' into a function to stop it from running:

if (Xrm.Page.context.client.getClient() != "Mobile")

Now the function will run if the code does not equal mobile.

Consider using business rules or calculated fields where possible to replace erroneous JavaScript functionality that will work on mobile devices.

Hope that helps resolve any errors you come across. For more Dynamics 365 how to guides and tips – make sure you subscribe to our blog!

Happy Dynamics 365'ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

PowerObjects Recommends