Creating a new project, package, and model
Elements in Dynamics 365 for Finance and Operations represent every individual element of AOT such as class, table, form, and so on. Elements in Dynamics 365 for Finance and Operations are stored on disk as XML files; these files contain the metadata and source code for the element. The XML files are the unit of Source Control.
Projects works the same as AX2012, but in D365 an element can be customized only once they are added to a specific Visual Studio project. The project may only belong to one model.
A Dynamics 365 for Finance and Operations model is a group of elements. Standard elements are part of a standard model; you can add them into your model and do customization. A model is a design-time concept. An example of models: warehouse management model, a project accounting model, and more. Models can have one or more projects. Models may only belong to one package.
A Dynamics 365 for Finance and Operations package is a deployment and compilation unit of one or more models. It includes model metadata, binaries, cubes, and other associated resources. One or more D365 packages can be packaged into a deployment package, which is the vehicle used for deployment on UAT and production environments. Packages are packaged into a deployable package file for deployment to Sandbox or production environments. A package can have one or more models. Packages can have references to other packages, just like .NET assemblies can reference each other.
How to do it...
To create a new project, follow these steps:
- Open Visual Studio as admin.
- On the
File
menu, point toNew
, and then clickProject
. - In the list of template types, expand the
Installed
node. - Expand the
Templates
node. - Select the
Microsoft Dynamics 365 for Operations
category. - Select the
D365 Project
template. - Enter the name and location for the new project.
- Select
Create directory for solution
if you want to create a new solution for this project, uncheck if you want to add in your current solution.
To create a new model, follow these steps:
- Open Visual Studio as admin.
- On the
Dynamics 365
menu, point toModel management
and selectCreate model
.
- Give a model, publisher name, and other values:
- Now here you can create a new package or select any existing package. We could create a new package and select the required package as referenced packages:
- Double-check the summary with details. Select
Create new project
if you want to create a new project in this model once created. You can mark this model to all your new projects by selecting options:
There's more...
As you saw, there was one more step while creating a model, Select referenced packages
. When you create your own package you can select from an existing package to add them as references in your new package. You may need to add some standard package reference if you want to add them into your customization.
Here are the steps to create a new package:
- Open Visual Studio as admin.
- On the
Dynamics 365
menu, point to Model management and selectCreate model.
- Give a model, publisher name, and other values.
- On the next step select
Create new package
- Give a name to your package.
- Next select the existing package as a reference to this new package.
- Click on
Finish
.
So now you have your own model with a new package.