Book Image

Programming Microsoft Dynamics NAV 2013 - Third Edition

Book Image

Programming Microsoft Dynamics NAV 2013 - Third Edition

Overview of this book

Microsoft Dynamics NAV 2013 is a complete and robust ERP system that is accompanied by a comprehensive set of development tools. You will learn how to master these tools and tailor Microsoft Dynamics NAV 2013 to meet your customer's specific business needs."Programming Microsoft Dynamics® NAV 2013" will lead you from start to finish, teaching you how to use this incredible ERP software whilst simultaneously making you a more productive developer. You'll learn how to implement your solutions, as well as evaluating, managing and appraising Dynamics NAV 2013 productions and projects.You will be empowered with the skills and knowledge that you need to get the job done and exceed your client's expectations. Step by step, you will learn how to use NAV, master the C/AL programming language, as well as the construction and uses of each object type. Ultimately, you will be able to bring your NAV 2013 solution together with fantastic efficiency.Hands-on development examples and additional material teach you by example and uncover the insider knowledge that only years of experience can provide, truly unleashing your productivity and potential.
Table of Contents (19 chapters)
Programming Microsoft Dynamics NAV 2013
Credits
Foreword
About the Authors
Acknowledgements
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. Now 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 include those fields originally 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 like the following:

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 include...