Book Image

Programming Microsoft Dynamics??? NAV 2015

Book Image

Programming Microsoft Dynamics??? NAV 2015

Overview of this book

Table of Contents (19 chapters)
Programming Microsoft Dynamics™ NAV 2015
Credits
Foreword
About the Authors
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Some simple coding modifications


Now we're going to add some C/AL code to objects we've created for our WDTU application.

Adding field validation to a table

In Chapter 4, Pages – the User's Interactive Interface, we created Table 50010 – Radio Show Fan. We've decided that we want to be able to use this list for promotional activities such as having drawings for concert tickets. Of course we want to send the tickets to the winners at their mailing addresses. We didn't originally include those fields in our table design, so must add them now. To keep our design consistent with the standard product, we will model those fields after the equivalent ones in Table 18 – Customer. Our updated Table 50010 will look as shown in the following screenshot:

Part of modeling our Table 50010 – Radio Show Fan fields on those in Table 18 – Customer is faithfully copying the applicable properties. For example, the TableRelation property for the Post Code field in Table 18 contains the following, which we should...