V tomto článku

Mobile platform home page

V tomto článku

By using mobile apps, you can reuse business logic and modeling from Microsoft Dynamics 365 for Finance and Operations. Mobile apps enable rich offline and mobile interactions, and provide an easy-to-use designer experience. Developers can create simplified forms in Microsoft Visual Studio and then design mobile apps that expose this functionality. The mobile platform makes it easy to change the forms and mobile app definitions to include customizations that are made to Finance and Operations.

Client-side development

Client-side APIs are used in the business logic file, which provides an extensibility layer to the mobile workspace that allows for customization. Some things that you can access and influence through the client-side APIs include:

Server-side development

Workspace attributes and classes are used to create, configure, and publish workspaces on the server. These server-side X++ APIs can be used instead of using the task recorder-based mechanism to build a workspace. Workspaces created using either mechanism can then be styled and augmented using the client-side APIs.

Debugging during development

During development it can be useful to attach a debugger to get more detailed information and insight into what is happening in the background. A web debugger can be used with the client-side JavaScript logic and styling and the Visual Studio debugger can be used with the server-side X++ business logic.

Debugging the client side

Prerequisites

Android device plus PC

Azure-hosted development machine (so the mobile device can point to it)

Steps to debug the client side

On the web client that is exposed by the Azure-hosted development machine, ensure that there are mobile workspaces published for the Unified Operations app. For information about publishing a mobile workspace, see Publish a mobile workspace.

Install the Android debug apk for the Unified Operations app on an Android device:

One time only, allow the installation of apk files - Go to Menu > Settings > Security and then check Unknown Sources to allow the phone to install apps from sources other than the Google Play Store.

Uninstall the Unified Operations app - Ensure that any previous version of the Unified Operations app has been uninstalled.

After you connect the debugger, find the active tab on your device. You may need to click View more tabs on Android. One of the tabs should look similar to /www.index.html#/app/appList or /www.index.html#/app/app_landing.

Expand the nodes to find the workspace JavaScript, such as File > (no domain) > ExpenseMobile.js. Click the JavaScript file to view it and add breakpoints.

Reflect the mobile device on your desktop so that you can interact with it on the desktop screen.

Go to through the desired workspace and forms.

If breakpoints are encountered, then the browser developer tools will allow you to control the flow of execution and see the values and parameters being passed.

To change styling at runtime, use the elements tab to alter the styling. This will help you determine what elements JavaScript should target and how those elements should be styled.

If a needed change is identified, make those changes in JavaScript, and then push those changes into the environment.

If more changes or validation is needed, repeat the process.

Debugging the server side

Prerequisites

Azure-hosted development machine (so the mobile device can point to it)

Steps to debug the serverside

On the web client exposed by the Azure-hosted development machine, ensure that there are mobile workspaces published for the Unified Operations app. For information about publishing a mobile workspace, see Publish a mobile workspace.

Open the Unified Operations app on your device, point to the Azure-hosted development machine, and sign in.

Open Visual Studio on the Azure-hosted development machine and attach the debugger to the w3wp process.

After you connect the debugger, find the desired business logic, and insert breakpoints as needed.

Either use the app on your device as usual, or reflect the mobile device on your desktop so you can interact with it on the desktop screen.

Navigate through the desired workspace and forms.

If breakpoints are encountered, then Visual Studio will allow you to control the flow of execution and see the values and parameters being passed.

If a needed change is identified, make those changes in X++, and push those changes into the environment.

If more changes or validation is needed, repeat the process.

Change needed for ADFS to support Mobile Client in on-premises environments

If ADFS is in use on the domain and the environment is on-premises, then ADFS must be configured to provide a regular forms-based authentication screen instead of using Windows Integrated Authentication (WIA). The Microsoft Dynamics Unified Operations apps for iOS and Android require the regular forms-based authentication screen. ADFS should be configured to only provide WIA for browser clients (use cases). For more information, see Configure intranet forms based authentication for devices that do not support wia

Troubleshooting

The Mobile Client app is not working correctly on particular devices

Sometimes the cache associated with the Unified Operations app becomes corrupt or obsolete and needs to be cleared. Unfortunately, the only way to clear the data associated with the app is to uninstall the app.
To completely uninstall the app, don't use the "long-press wiggle and x on the app icon" method. Instead, completely uninstall the app by navigating to Settings > General > iPhone Storage > Dynamics 365 Unified Operations, and then click Delete App. After 10-15 seconds, the app can be reinstalled.

I can't figure out how to build or change something in my Mobile Client content

There are many resources that you can leverage to figure out how to build or change content for the Mobile Client.

Review the documentation provided in the Dynamics 365 for Finance and Operations Help system.

Publish and review the Expense Management workspace, and other standard workspaces, for examples. Demo data for the USSI company is useful when using the Expense Management workspace. The forms and X++ code that make up the Expense Management workspace can be found in the Application Explorer by searching for the "ExpenseMobile" prefix.