Book Image

Mastering Microsoft Dynamics AX 2012 R3 Programming

By : Simon Buxton, Mat Fergusson
Book Image

Mastering Microsoft Dynamics AX 2012 R3 Programming

By: Simon Buxton, Mat Fergusson

Overview of this book

<p>Due to its interesting capabilities such as finance and supply chain management, business intelligence and reporting, project management, and so on, Microsoft Dynamics is one of the most widely used solutions adopted by many organizations across the globe. This book is a step-by-step tutorial that covers elements from the initial design through to development. Each concept is fully explained and demonstrated by the creation of a real-world project. You will learn some really useful, advanced development techniques such as extending your code with metadata and exception handling.</p> <p>This book is an invaluable tutorial if you are moving from another ERP system or language, or if you are a technical consultant with a desire to create efficient functional designs and business solutions.</p>
Table of Contents (21 chapters)
Mastering Microsoft Dynamics AX 2012 R3 Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Referential integrity – delete actions and validation


It is critical that we enforce data integrity on the tables we create. AX assists us a lot with this by creating relations. AX will use the relations we created earlier to ensure that data entered through the user interface is valid. Simply put, we can only enter a vehicle group on the vehicle table that exists in the vehicle group table. It is more accurate in this example to say that the data entered in the vehicle group field is validated against the relation; the relation might have an additional constraint.

AX handles that data entry validation, but what happens when we want to delete a vehicle group? The system cannot know the answer to this because we have different scenarios here, as shown in the following table:

Foreign table

Related table

Action

ConFMSVehicleGroup

ConFMSVehicleTable

Restrict deletion

ConFMSVehicleSchedule

ConFMSVehicleTable

Restrict deletion

ConFMSVehicleTable

ConFMSVehServiceTable

Cascade

This is...