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.
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:
1
>npminstall -g dynamicsmobile-cli
Copied!
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:
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.
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:
1
# generates .ts file in the .dms folder, containing business objects client side code
2
>npm run genbo
Copied!
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.