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.
Dynamics Mobile SDK is developed with Node.js and TypeScript and all of the examples, guides and tools supposes Node.js/TypeScript development
You will need to have registered account in the Dynamics Mobile Platform.
Before starting with Dynamics Mobile application development you need to make sure that your machine has the following prerequisites:
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
Open command line on your development machine and type the following:
> npm install -g dynamicsmobile-cli
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]
> dms profile --o login --a [MYAPPAREA]
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
Once you have the application folder initialized, you can build the application by using the following command from the command line:
> npm run build
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:
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.
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.