Показать сообщение отдельно
Старый 28.09.2018, 00:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
powerobjects: How to Disable JavaScript in Dynamics 365 Apps
Источник: https://www.powerobjects.com/2018/09...mics-365-apps/
==============


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!



Источник: https://www.powerobjects.com/2018/09...mics-365-apps/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.