Monday, March 18, 2019

Delete a Model in D365 Finance and Operations.

https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-tools/models

Deleting a model

On a development or test environment, follow these steps to delete a model.
The following steps assume the local model store folder is C:\AOSService\PackagesLocalDirectory and your model is named MyModel1.
If your model belongs to its own package (For example: An extension package with no other models in the package):
  1. Stop the following services: The AOS web service and the Batch Management Service
  2. Delete the package folder C:\AOSService\PackagesLocalDirectory\MyModel1
  3. Restart the services from step 1
  4. If Visual Studio is running, refresh your models (Visual Studio > Dynamics 365 > Model management > Refresh models)
  5. In Visual Studio, perform a full database synchronization (Visual Studio > Dynamics 365 > Synchronize database...)
If your model belongs to a package with multiple models (For example, MyModel1 overlays Application Suite):
  1. Stop the following services: The AOS web service and the Batch Management Service
  2. Delete the model folder C:\AOSService\PackagesLocalDirectory<PackageName>\MyModel1 (In this example PackageName=ApplicationSuite)
  3. Restart the services from step 1
  4. In Visual Studio, refresh your models (Visual Studio > Dynamics 365 > Model management > Refresh models)
  5. In Visual Studio, build the package that the deleted models belonged to (Visual Studio > Dynamics 365 > Build models...)
  6. In Visual Studio, perform a full database synchronization (Visual Studio > Dynamics 365 > Synchronize database...)