Category Archives: Tips & Tricks

D365/AX7:Exclude test packages/models(DemoDataSuite) from VSTS build output


Some X++ hotfixes related to model “DemoDataSuite” belongs to your one-box development machine only.It means you cannot deploy it on UAT or on production environment else you will get below error related to applicationfoundationformadaptor dependency

The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: Unable to resolve dependency ‘dynamicsax-applicationfoundationformadaptor’.


To exclude package “DemoDataSuite” or any other model from VSTS Or DevOps build output you can set the parameter or variable PackagingExclusions before queuing the build.Once the build will complete, deployable packages or artifacts will not contain excluded models.







D365/AX7:Preceding & Succeeding Methods & Events Of Table

Preceding & Succeeding Methods & Events Of Table

  1. ValidateWrite, ValidatingWrite & ValidatedWrite
  2. ValidateDelete, ValidatingDelete & ValidatedDelete
  3. ValidateField, ValidatingField & ValidatedField
  4. ValidateFieldValue, ValidatingFieldValue & ValidatedFieldValue
  5. modifiedFieldValue, ModifyingFieldValue & ModifiedFieldValue
  6. modifiedField, ModifyingField & ModifiedField
  7. Insert, Inserting & Inserted
  8. Delete, Deleting & Deleted
  9. InitValue, InitializingRecord & InitializedRecord


D365/AX7:Move the objects/Customisation/Elements from one model to another

Purpose :

Move the Objects/Customisation/Elements from one model to another model.

Example : Table “T” exists in Model “A”.Now developer wants to mode the table “T” from model “A” to a new model “B”.


  1. Open your original project from where you want to move Objects/Customisation/Elements to a different model.
  2. Right click on project solution node, click on add a new project and set it as your model in which you want to move Objects/Customisation/Elements.
  3. Drag and drop the objects from your old model  to your newly created model.
  4. Rebuild and synch the models.

Cheers 🙂

Piyush Adhikari




D365/AX7:Cannot save K:\AosService\PackagesLocalDirectory…The Model XXXX is locked & cannot be edited.


Cannot save K:\AosService\PackagesLocalDirectory…The Model XXXX is locked & cannot be edited



Go to Dynamics 365 – Model Management – Update Model Parameters

Select Model Name and untick boolean LOCKED.


D365/AX7: “Module dependency graph has cycles” Issue and Resolution


Error “Module dependency graph has cycles” is occurring at the time of doing any changes or update in existing model or creating a new model or event at the time of running “Build Models”.


The reason is when one model is dependent on a second model and the second model is dependent on the first model.It means one model contains a reference of second model and second model also contains the reference of first model.


1. Go to the AOSService folder located on the main drive.
2. In the AOSService folder open the PackagesLocalDirectory folder.
3. Now in this folder, you’ll find all the models. Locate your model and open the folder.
4. In this folder locate to Descriptor Folder.
5. Copy this file to any location of your choice and open it in any text editor.
6. Remove the tag that contains the model which is not present and is the source of the error.
7. Finally copy this file back to the original location and replace the file in the destination folder.
8. Refresh models in Visual Studio and you’re good to go.