Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Programming Microsoft Dynamics 365 Business Central - Sixth Edition

You're reading from  Programming Microsoft Dynamics 365 Business Central - Sixth Edition

Product type Book
Published in Apr 2019
Publisher Packt
ISBN-13 9781789137798
Pages 536 pages
Edition 6th Edition
Languages
Authors (3):
Marije Brummel Marije Brummel
Profile icon Marije Brummel
David Studebaker David Studebaker
Profile icon David Studebaker
Christopher D. Studebaker Christopher D. Studebaker
Profile icon Christopher D. Studebaker
View More author details

Table of Contents (12) Chapters

Preface Introduction to Business Central Tables Data Types and Fields Pages - The Interactive Interface Queries and Reports Introduction to AL Intermediate AL Advanced AL Development Tools Successful Conclusions Assessments Other Books You May Enjoy

Application tables

Table objects are the foundation of every Business Central application. Tables contain data structure definitions, as well as properties that describe the behavior of the data, including data validations and constraints.

More business logic is required in complex applications than in simple data type validation, and Business Central allows AL code to be put in the table to control the insertion, modification, and deletion of records, as well as logic on the field level. When the bulk of the business logic is coded on the table level, it is easier to develop, debug, support, modify, and even upgrade. Good design in Business Central requires that as much of the business logic as possible resides in the tables. Having the business logic coded on the table level doesn't necessarily mean that the code resides in the table.

The Business Central online documentation recommends the following guidelines for placing AL code:
  • In general, put the code in codeunits instead of on the object on which it operates. This promotes a clean design and provides the ability to reuse code. It also helps enforce security. For example, typically, users do not have direct access to tables that contain sensitive data, such as the general ledger entry table, nor do they have permission to modify objects. If you put the code that operates on the general ledger in a codeunit, give the codeunit access to the table, and give the user permission to execute the codeunit, then you will not compromise the security of the table and the user will be able to access the table.
  • If you must put code on an object instead of in a codeunit, then put the code as close as possible to the object on which it operates. For example, put code that modifies records in the triggers of the table fields.
You have been reading a chapter from
Programming Microsoft Dynamics 365 Business Central - Sixth Edition
Published in: Apr 2019 Publisher: Packt ISBN-13: 9781789137798
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}