Book Image

Learning MS Dynamics AX 2012 Programming

By : Mohammed Rasheed, Erlend Dalen
Book Image

Learning MS Dynamics AX 2012 Programming

By: Mohammed Rasheed, Erlend Dalen

Overview of this book

<p>This tutorial has been carefully structured to guide you through the basic features of AX development and get you started as quickly as possible. With this book, you will soon be able to develop and maintain comprehensive management solutions to enhance your Dynamics AX 2012 application's performance. Starting with a tour of the development environment, you'll gain a deep understanding of Dynamics AX tools and architecture, before getting to grips with X++ for deeper customization. You will also learn how to search, manipulate, and integrate data.</p> <p>The practical examples in this book take you through sample AX development projects and help you learn to create forms, reports, menu&nbsp; items, menus, and navigation pages. The book also helps you work with MorphX. By the end of this book, you will have a better understanding of the inner workings of Microsoft Dynamics AX—making your development simpler and faster, and your applications fast, reliable, and robust.</p>
Table of Contents (21 chapters)
Learning MS Dynamics AX 2012 Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Links
Debugger
Index

The validation methods


Before manipulating the data, it's a good idea to make sure that the data you are inserting, updating, or deleting doesn't break any of the rules you have set for the table you are manipulating.

These rules are typically to check that all mandatory fields have data in the buffer that you are trying to insert or update, or to check that the record you are about to delete doesn't have any related records in the tables set up with a restricted delete action.

A validation method should always return a Boolean value. This value will be true if the validation is OK and false if it's not OK.

If you don't use the validation methods, you will be allowed to have records with mandatory fields empty when inserting or updating records from X++. You will also be allowed to delete records that have restricted delete actions against other tables. This means that you are likely to get unreferenced data if you don't use validation methods.

There are three data validation methods used in...