4. Dynaway mobile setup

Deploy and test the Mobile Client website

Introduction

This section describes the steps required to deploy a mobile website, which is used on the Mobile Clients.

Prerequisites

You have completed mobile setup for D365FO, as described in the section above.

Audience
Sysadmin, Partner Consultant

Deployment Scenarios

There are two deployment scenarios. Use the scenario that applies to your company.

Scenario 1

The first time you deploy a mobile website, follow the steps described in the four articles below in sequential order:

  1. Create an Azure storage account (optional - only required if you want to manage large files on the Mobile Client)
  2. Add the Azure app (App Service)
  3. Web application registration on Azure Active Directory
  4. Configure and upload the mobile site:
    1. Configure the mobile site
    2. Configure attachments
    3. Upload the mobile site

When you create Azure resources, we recommend that you create a dedicated resource group for each purpose (example: one resource group for development and test, and one resource group for production).

Scenario 2

If you upgrade a mobile website from version 2008.0 or a previous version, do the following:

  1. Open the mobile app registration.
  2. Go to Authentication.
  3. You see a link on the Web tab with a text similar to "This app has implicit grant settings enabled. If you are using any of these URIs in a SPA with MSAL.js 2.0, you should migrate URIs". Select the link and follow the steps.
  4. Proceed with steps 9-10 in the step-by-step procedure in the article Web application registration to complete the upgrade process.
  5. Configure and upload mobile site:
    1. Configure the mobile site
    2. Configure attachments
    3. Upload the mobile site

Scenario 2 > Step 3: Migrate URIs
Scenario 2 > Step 3: Migrate URIs

Create an Azure Storage Account

This step is optional.

An Azure storage account is required for interfacing with Dynamics 365 for Finance and Operations environments. The storage account is used as a temporary storage when uploading attachments from the mobile devices, such as images and pdf files. The storage account is only required if you want to manage large files on the Mobile Client.

If you're going to use attachments that are less than 20 MB in size per file, skip this section. You only need to create an Azure storage account if you expect to use attachments with a file size larger than 20 MB per file on the Mobile Client.

For additional information about Azure Blob storage setup and file size limitations, refer to the "appSettings" table and the text below the table in the article Configure the mobile site. The following app settings must be left blank if you skip the setup in this section:

  • ax7StorageAccountName
  • ax7StorageAccountKey

For DEV and TEST purposes, the General-purpose Azure storage account that is deployed with the Dynamics 365 for Finance and Operations environment can be used. Typically, the storage account can be identified by the resource group associated with the Azure environment.

  1. Navigate to Storage accounts.
  2. Select Add. These are the recommended settings:
    1. Storage account type: General-purpose
    2. Replication: Locally redundant storage (LRS)

Add Azure Application Service

The Azure installation consists of an Azure client deployment package. The deployment package is installed on an Azure website connected to the application registration.

  1. On https://portal.azure.com/, log in with your Windows Azure credentials.
  2. Create a website in Azure by creating a Web App. In Azure, select App Services.
  3. Select Create.
  4. Create a new Web App. The App name must be globally unique. Select a name that is related to your company (Example: "[company name]-am-dev").
    1. Create a dedicated resource group (recommended).
    2. Select the latest ASP.NET runtime V4.8, and the Operating System setting is automatically set to "Windows".
    3. In the Region field, select the region related to the physical data centre on which the new mobile website is created.
    4. Click "NEXT" till the DEPLOYMENT tab. Select "Basic authentication" to "ENABLED".
    5. Deploy app service.
  5. Wait for the resource to deploy and navigate to the new App Service: Click "Go to resource".
    1. In "Overview", Copy the URL and add https:// at the beginning. You'll use it in a later step.
  6. Create one or more virtual applications.
    1. Each Dynamics 365 for Finance and Operations environment requires a dedicated mobile client installation. If you have a license for Dynaway mobile work execution, then you need to create /work in "Virtual patch" and site\wwwroot\work in "Physical patch". If you have a subscription to the Dynaway Planning board also, make /plan and site\wwwroot\plan (screenshot below)
  7. Select Deployment Center and "FTPS" in the App Services menu as the deployment option.
    1. Copy the FTPS URL and the App Credentials user name and password. Connect with the FTP Server and create two directories, "work" (for Work Execution app) and "plan" (for Planning Board app), inside of site\wwwroot\
      The directories must be created in "site\wwwroot\".

Step 5 Copy the value and add https://
Step 5 Copy the value and add https://
Step 6: Create virtual applications.
Step 6: Create virtual applications.
Step 7: Connect with FTP Server and create two folders
Step 7: Connect with FTP Server and create two folders

Web Application Registration

Before you set up the Azure mobile site for the Mobile Client, you must first make a web application registration. The Azure web application registration ensures that the Mobile Client web app has security permissions to access Dynamics 365 for Finance and Operations.

Some steps regarding creating a web application registration require that you're set up as an 'Azure Global Administrator'.

Refer to this article from Microsoft for more information on how the Mobile Client is integrated with the Azure Active Directory https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app.

  1. Select the link https://portal.azure.com to open Microsoft Azure Dashboard.
  2. Navigate to Azure Active Directory.
  3. Select App registrations, and select the New registration button.
  4. In the Name field, insert the name of your Mobile Client. Examples: "Mobile AM Prod" and "Mobile AM Test-01".
  5. Select "Single-page application (SPA)" in the drop-down.
    This URL must be the same as when setting up the Azure Mobile Site, described in the article Add the Azure app, taken from "Overview" and added https://
  6. Select Register and wait for the resource to deploy.
  7. Navigate to App registrations settings.
  8. Select API permissions from the settings menu.
    1. Select Add permission > Dynamics ERP.
    2. Select Application permissions.
    3. Select one permission: Connector.FullAccess.
    4. Select Add permission.
    5. Select Add permission > Microsoft Dynamics ERP.
    6. Select Delegated permissions.
    7. Select two permissions: AX.FullAccess and CustomService.FullAccess.
    8. In API permissions > Grant consent, select Grant admin consent for... and select "Yes" on the pop-up screen. This step requires you to be an 'Azure Global Administrator'.
  9. Select Overview from the settings menu.
    1. Find and copy the Application (client) ID for your mobile client application. You'll use this Application ID to set up the Azure mobile site, described in the article Add the Azure app.

Steps 8: Select
Steps 8: Select "Dynamics ERP" permission.
Step 9: Check redirect URIs.
Step 9: Check redirect URIs.

Get Dynaway Web Application

Go to LCS.dynamics.com -> your project -> Asset Liblary and Download the package with the mobile app.

Download Dynaway mobile webapp
Download Dynaway mobile webapp

Configure the Mobile Site

When you've set up the Azure mobile site, created the web application registration, and uploaded the mobile deployment files, the next step is to upload the Mobile Client application files.

  1. Extract the mobile installation files (from the zip file).
  2. Locate the web config file, and edit it in a text editor. Go to the <appSettings> section, and change the settings in the table below to your current settings. The table below only shows examples.
App setting Example value Description
ax7Url

<add key="ax7Url"
value="https://contoso-test.sandbox.operations.
dynamics.com
" />

The URL for the Dynamics 365 for Finance
and Operations environment.

ax7ClientId

<add key="ax7ClientId"
value="b097fac0-deae-4959-9791-53bcb40a9909" />

This ID is the application ID of your App registration,
and it can be found in the Azure portal by navigating
to Microsoft Azure Portal > Azure Active Directory
> App registrations > Application ID.
Refer to the last step (step 10) in the
section Web application registration.
axDomain <add key="axDomain" value="contoso.com" />

Define the Active Directory domain name for the users
who should be able to log in on the Mobile Client.

ax7Storage
AccountName

An Azure Blob Storage account name.

Values are stored in Azure Portal > Storage Accounts
> Azure Blob Storage account > Access keys.

For more information on creating a storage account,
if an account is not readily available, refer to Microsoft
documentation: Create a storage account.
Please remove the value from the web.config file if not used.

ax7Storage
AccountKey

An Azure Blob Storage account key. It is recommended
to use the secondary key. This could be the account key
of the Azure Blob Storage associated with your
Dynamics 365 for Finance and Operations account.

Values are stored in Azure Portal > Storage Accounts
> Azure Blob Storage account > Access keys.

Please remove the value from the web.config file if not used.

isMSAM Set to "true"

If the settings 'ax7StorageAccountName' and 'ax7StorageAccountKey' are left blank, there is a limitation of 18-20 MB per file. The IIS service running Dynamics 365 for Finance and Operations sets the limit. We recommend that you do not adjust these settings in a running environment.

Step 1: Extract files
Step 1: Extract files
Step 2: Storage account name and key
Step 2: Storage account name and key

Upload the Mobile Site

Use an FTP client with the specified credentials and URL described in the article. Add the Azure app to upload the mobile client application files.


1. Download the package from LCS, and extract internal files.
2. Go to Azure app service --> deployment centre, copy & paste credentials, and connect to the FTP server.
3. Verify web.config file for Dynaway web client: WORK EXECUTION and PLANNING BOARD
4. Upload the newest files to the FTP localisation.

The files to be uploaded are located in the .zip file. The zip package can be downloaded from lcs.dynamics.com, as shown in the screenshot below.
Drag and drop files to the FTP /work and /plan directory. Make sure the web.config file is up to date.

Download Dynaway webapp files from lcs.dynamics.com
Download Dynaway webapp files from lcs.dynamics.com
Work execution and Planning board apps
Work execution and Planning board apps
Azure app services ftp connection details
Azure app services ftp connection details
Use the newest web.config file and update values
Use the newest web.config file and update values
Update files FTP Server
Update files FTP Server

Copyright Dynaway A/S

Privacy Policy