Getting Started

Getting Started with Dynamics Mobile Application Development

Dynamics Mobile SDK is provided as NPM module. It provides tools and libraries, which makes the development of business mobile and web applications easier and faster.

NodeJs and TypeScript

Dynamics Mobile SDK is developed with Node.js and TypeScript and all of the examples, guides and tools supposes Node.js/TypeScript development

Steps to Get Started

Set Up Dynamics Mobile Account

You will need to have registered account in the Dynamics Mobile Platform.

Checkout the account setup docs.

1. Prepare your development machine

Before starting with Dynamics Mobile application development you need to make sure that your machine has the following prerequisites:

  • Node.js

  • Git (optional but highly recommended)

Node.js can be downloaded and installed from the official Node.js website

Git (optionally) can be downloaded and installed from Git website

All of our examples and instructions are considering usage if npm package manager, but you can use alternatively yarn or other compatible package manager of choice

2. Install Dynamics Mobile CLI

Open command line on your development machine and type the following:

> npm install -g dynamicsmobile-cli

3. Create local development profile

You need to go to www.dynamicsmobile.com, login with your development username and create a new API key. Note down your application area and the new apikey and run the following command:

dms profile --o create --a [MYAPPAREA] --k [xxxxxxxxxxxxxxx]

4. Use your new profile

> dms profile --o login --a [MYAPPAREA]

5. Create mobile application project:

It first involves creation a folder for your application ( called myapp in this case). The we need to go into the myapp folder. Finally we tell Dynamics Mobile SDK to initialize our folder with a sample mobile application source code.

> md myapp
> cd myapp
> dms  init --app MyApp --type m

The examples are based on the Dynamics Mobile CLI tool. Checkout the Dynamics Mobile CLI documentation for more info.

6. Build your new mobile application:

Once you have the application folder initialized, you can build the application by using the following command from the command line:

> npm run build

6. Run and play with your first application:

You can run the app locally on your development machine by following these steps:

> npm run start

Open your web browser (Chrome is recommended) and navigate the following url:

http://localhost:3001

You will see a login screen.

Enter your Dynamics Mobile credentials obtained in step #2 (application area, username,password) and Voilà - you will see the home screen of your newly created mobile app.

7. Modifying and developing your new mobile application

You can open the application source code with your favorite development too. You can use Theia or Visual Studio Code (or other typescript environment).

Open the project folder from the development environment You will see the following file structure

  • .bin* - Automatically managed folder. It contains the app output. Do not modify or delete the folder manually!

  • .dms - Automatically managed folder. It contains tools used for building and running the app locally. Do not modify or delete the folder manually

  • .vscode - contains Visual Studio Code specific configurations

  • node_modules - npm modules. Use the standard npm tools to manage it.

  • src - contains the actual source code of the app

    • Business Objects - business objects definitions

    • Tasks - User Interface Tasks definitions

    • Code - Code definitions used across the app

    • Views - Views(screens) layouts and code

    • Translations - language translation files

    • Components - reusable components

If you add or modify a business objects from within the Business Objects folder, you might need to re-generate the business objects .ts file by executing the following command in the terminal window:

# generates .ts file in the .dms folder, containing business objects client side code
> npm run genbo

The command will generate new .ts file from the Business Object definition files and then you will be able to use the business objects into your code and take advantage of TypeScript code completion in Visual Studio Code.

You can additionally review our Mobile API Reference for deeper technical look on what's available for developers and Application Development Documentation.

Last updated

Dynamics Mobile provided by Mobile Affairs Ltd. | 1712 Sofia, Bulgaria, Alexander Malinov 51 | sales@dynamicsmobile.com