Microsoft Dynamics NAV 2009 Application Design - Marije Brummel - E-Book

Microsoft Dynamics NAV 2009 Application Design E-Book

Marije Brummel

0,0
35,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Dynamics NAV 2009 is an Enterprise Resource Planning (ERP) software product from Microsoft that can be used for variety of business needs. It is part of the Microsoft Dynamics family, and intended to assist with finance, manufacturing, Customer Relationship Management, supply chains, analytics, and electronic commerce for small and medium-sized enterprises. This book is a focused tutorial on Microsoft Dynamics NAV application development, so you can develop complete applications and not just application outlines. It will show NAV developers how to create different kinds of applications. Different kinds of application are vital in different industries like fashion, automobile, retail, books (education), and other industries. It starts off by introducing the supply chain that you will be using throughout the book. You will implement the Microsoft Dynamics NAV ERP suite and learn how it is set up and customized for various industries. You will be able to customize Dynamics NAV to suit the different aspects of a business such as Financial Management, Relationship Management, Production, Jobs, Trade, Storage, Logistics, and so on. The book will take you through these Microsoft-designed application features and show you how to customize and extend them safely. Thus, you will be able to create a structure of your own in Microsoft Dynamics NAV.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 431

Veröffentlichungsjahr: 2010

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Microsoft Dynamics NAV 2009 Application Design

Design and extend complete applications using Microsoft Dynamics NAV 2009

Marije Brummel

BIRMINGHAM - MUMBAI

Microsoft Dynamics NAV 2009 Application Design

Copyright © 2010 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: June 2010

Production Reference: 2180722

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 978-1-84968-096-7

www.packtpub.com

Cover Image by Tina Negus ([email protected])

Credits

Author

Marije Brummel

Reviewers

Daniel Rimmelzwaan

Max Traxinger

Jeremy Vyska

Eric Wauters

Acquisition Editor

Rashmi Phadnis

Development Editor

Mayuri Kokate

Technical Editors

Neha Damle

Bhavesh D. Bhasin

Editorial Team Leader

Gagandeep Singh

Project Team Leader

Lata Basantani

Project Coordinator

Poorvi Nair

Proofreader

Lesley Harrison

Indexer

Rekha Nair

Production Coordinator

Adline Swetha Jesuthas

Cover Work

Adline Swetha Jesuthas

Foreword

The history of the Dynamics NAV application started with a small accounting product called "PC-Plus" back in 1984. The idea was to create an application suitable for bookkeepers who had no knowledge of computers. It was done by copying real life artifacts like paper journals, orders, and invoices and it even had a copy of a Canon table calculator! "PC-Plus" was an overnight success – but soon a huge demand for customizations and verticals started developing. After the "PC-Plus" team developed a vertical for auto repair shops called "Auto-Plus", they realized that if they had to create all the functionality themselves, their business would never scale. Therefore, they got the idea to create a product including a base application and a set of tools suitable for others to build exactly the functionality they wanted. That was the start of Dynamics NAV as we know it today.

Over the years, the base application evolved. When "PC-Plus" was created, people loved it for its core G/L functionality—but soon the same people wanted the same simple solution to help run more of their business and eventually manage their entire business. This meant that the Dynamics NAV application grew from being all about finance management to cover manufacturing, distribution, service management, projects and CRM and is today a fully-fledged ERP solution. Even though the application has grown, it is still simple and consistent, which makes it possible for a single developer to overview it, understand it, and build exactly the necessary functionality.

Michael Nielsen

Director of Engineering, Dynamics NAV,

Microsoft Development Center Copenhagen — Denmark

About the Author

Author, programmer, consultant, project manager, presenter, evangelist, salesperson, and a trainer. Marije Brummel has worked for Partners, ISVs, End Users, Master VARs, and Microsoft across the globe in more than 25 countries.

It's next to impossible to find someone as widely and deeply experienced as Marije in the Business Central community. She has received numerous awards including the Microsoft MVP award and the NAVUG All-Star. She was chair of the Dynamics Credentialling committee and authored the official Microsoft Exam materials. She did both onsite and online readiness sessions for Microsoft when the product went through major changes, such as moving from two-tier to three-tier and the introduction of extensions.

Her biggest passion is changing the world for the better in every way possible. One of her biggest achievements was the introduction of Design Patterns into the Business Central community. She is the go-to girl when it comes to performance troubleshooting and upgrade challenges. Technologies such as the Azure stack and Web frameworks don't hold secrets in regards to Business Central.

Marije has written many books and countless blog articles and YouTube videos, which influenced almost every person and project involved with Business Central. At home, she enjoys the outdoors with her dog and tries to spend as much time as possible with her kids and family. She likes shopping and traveling.

Acknowledgement

Just before I was asked to write this book, I sold my company and went back to freelancing in order to spend more time with my wife Dionel and kids Josephine (6), Wesley (4) and Saskia (1½). Therefore, I would like to thank them for allowing me this great opportunity and challenge. Writing this book has taken the better part of weekends, evenings, and vacations for a period of almost half a year. I will never forget this period where daddy is writing a book and Josephine asking, "What is your book about dad?" (in Dutch of course) and me finding it difficult to explain.

I would also like to thank Packt Publishing for giving me the opportunity to write a book about the application that I love so much. The people at Packt were very helpful and patient in helping me explore the life of an author and my continuous efforts in changing the outline and number of chapters and pages.

I have tried my best to write a book about the real intention of what Microsoft Dynamics NAV is. NAV is more than ERP and more than a Development Environment. It is about simplicity and being able to create applications using a unique structure and way of thinking.

Many people have helped to get this book at the great level it is. First of all, the technical reviewers, Daniel Rimmelzwaan, Matt Traxinger, Jeremy Vyska, and Eric Wauters who have done an excellent job in improving my efforts in writing. I would like to thank Andrew Good for his help with Chapter 5, Production.

The examples for implementing Microsoft Dynamics NAV in vertical industries in Chapters 5 and 6 are taken from real implementations and I would like to thank these companies for taking the time and effort to answer my questions:

Arseus: Karel JutteBakery 't Stoepje: Sjacco NelBosman Medical Supplies: Renate LukassenRev'it Sport: Bas Stijntjes, Theo van Geel, and Peter KuypersWildkamp: Albert Smit and Gerard Nijlant

I would like to thank all the people who helped me during the first thirty three years of my life. Leaving school when I was 18, I studied at the university of life (sometimes the hard way) with the help of many who guided me in my personal and business life. Amongst all these people are of course my wife Dionel, my parents, great parents, brother Rene and sister Anna, and my parents-in-law.

Special thanks go to David and Karen Studebaker. I met them in 2006 at Tech-Ed in Boston, USA. They have been of invaluable help in bringing structure in my business and personal life.

About the Reviewers

DanielRimmelzwaan was born and raised in The Netherlands, and moved to the USA at the end of 1999 to be with his new American wife. In Holland, he worked as a Microsoft Access and VBA developer. When looking for a job as a VB developer in the USA, he was introduced to Navision by a "VB Recruiter", and was intrigued by the simplicity of its development tools. He decided to accept a job offer as a Navision Developer, with the firm intention to continue looking for a 'real' developer job.

More than 10 years later, a long stint at a Microsoft partner, a few years as a freelancer, and now back in the partner channel, Daniel is still working with NAV. He currently works for Archerpoint, one of the largest and most experienced Microsoft Dynamics NAV partners in the USA, and he is enjoying his career more than ever.

Daniel has had the opportunity to work in a wide variety of roles such as Developer, Analyst, Designer, Team Lead, Project Manager, Consultant, and more. Although he has a very versatile experience with all things related to NAV, his main focus is custom development, with a bias toward helping his customers solve NAV performance issues on SQL Server.

Ever since he started working with NAV, Daniel has been an active member of the online communities for NAV, such as mibuso.com, dynamicsuser.net, and the online forums managed by Microsoft. For his contributions to these online communities, Daniel received his first of five consecutive Microsoft Most Valuable Professional Awards in July 2005, which was just the second year that the MVP Award was given out for NAV. The MVP Award is given out by Microsoft to independent members of technology communities around the world, and recognizes people that share their knowledge with other members of the community.

Daniel lives with his wife and two kids in Michigan in the USA.

MattTraxinger graduated from the Georgia Institute of Technology in 2005 with a B.S. in Computer Science, specializing in Human Computer Interaction and Cognitive Science. After college, he took a job as an add-on developer using a language he was unfamiliar with for a product he had never heard of: Navision. It turned out to be a great decision.

In the following years, Matt learned all areas of the product and earned Microsoft Certified Business Solutions Professional certifications in both technical and functional areas of NAV. He continues to stay current with new releases of the product and is certified in multiple areas for versions 4.0, 5.0, and 2009.

Currently Matt works in Norcross, GA, for Canvas Systems, one of the largest resellers of new and refurbished computer equipment as an in-house NAV Developer and Business Analyst. He supports multiple offices in the United States as well as locations in the United Kingdom and the Netherlands.

Matt is also writing the NAV Development Cookbook for Packt Publishing which should be released later this year. In his spare time, you can find him on the online communities Mibuso.com and DynamicsUser.net under the name MattTrax, helping others learn more about the Dynamics NAV software.

JeremyVyska started his career in Microsoft Dynamics NAV in 2000. Since then, he has worked with, implemented, and customized almost every functional area of Dynamics NAV. He has fulfilled many business process roles relating to Dynamics NAV, including technical sales, requirements gathering, project planning, implementation, training, support, and of course, development. He has overseen teams of staff working on a project, as well as co-ordinating of independent resources.

Jeremy has also specialized in add-on and vertical development, which is a different skill-set than typical client development. Optimizations and maintainability are even more critical in those products, since partners may need to implement and customize the solution. He has been on the development and PM teams of at least half a dozen such solutions that are actively in the market space today, most notably Serenic Software on their premiere NAV-based solution for non-profits and NGO's.

Currently, Jeremy runs Small Square Services (founded in 2009), providing a wide variety of services to the worldwide Microsoft Dynamics NAV Partner Channel and supporting customers throughout the northeast US.

EricWauters is one of the founding partners of iFacto Business Solutions www.ifacto.be. With nine years of technical expertise, he is an everyday inspiration to its development team. As development manager, he continually acts upon iFacto's technical readiness and guarantees that he and iFacto are always on top of the latest Microsoft Dynamics NAV developments. Apart from that, Eric is also very active in Microsoft Dynamics NAV community-life where he tries to solve technical issues and thrives to share his knowledge with other Dynamics NAV enthusiasts. Surely, a lot amongst you will have read some of Eric's posts on Mibuso.com, Dynamicsusers.net or his own blog www.waldo.be which he invariably signs with "waldo". In 2008, he co-founded the Belgian Dynamics Community, a platform for all Belgian Dynamics NAV users, consultants and partners, enabling knowledge sharing and networking. His proven track record entitled him to be awarded in 2007, 2008, 2009, and 2010 as MVP (Microsoft Most Valuable Professional).

Table of Contents

Preface

Chapter 1: Introduction to Microsoft Dynamics NAV

Versions and history

What is this book about

Setup versus customization

The beauty of simplicity

Horizontal versus vertical solutions

Open source

Structure of this book

The Role Tailored concept

The building blocks

Tables as user interface and business logic

Dynamics NAV in throughout supply chain

Some basics

Data model principles

Master data

Journals

More journals and entries

Documents—combining the journals into processes

Other structures

Summary

Chapter 2: A Sample Application

Fit-gap analysis

Designing a Squash Court application

Look, learn, and love

Getting started

Creating squash players

Designing a journal

Squash Court master data

Chapter objects

Reservations

The Journal

Time calculation

Price calculation

Dimensions

The posting process

Check line

Post line

Invoicing

Invoice document

Posting process

Navigate

FindRecords

ShowRecords

Summary

Chapter 3: Financial Management

Chart of accounts

Posting accounts

The entry tables

General journals

Posting groups

Dimensions

Budgeting

Accounting periods

Currencies

Consolidation

VAT statement

Data analysis

The setup

Customizing financial management

Sales line description to G/L entries

Extra fields in the G/L entries

Integrating with financial management

Creating a G/L transaction

Look, learn, and love

Summary

Chapter 4: Relationship Management

How companies work

Contacts

Profiles

Interactions

To-do's

Segments

Campaigns

Outlook integration

The setup

Customizing relationship management

Salutation formula types

Customer and vendor numbering

Sharing contact information across companies

Add contacts to segments

Summary

Chapter 5: Production

What is production?

History of production

Production methodologies

Raw materials

Basic production principles

Bill of materials

MRP

MPS

Item costing

Item tracking

Quality control

Energy and waste

APICS

Getting started

Assembling

Item costing in ten steps

Manufacturing

Specialized production

Kitting

Vertical industry implementation

Fashion

Automotive

Medicines

Food

Furniture

Summary

Chapter 6: Trade

The process

Wholesale versus retail

Sales and purchasing

Transaction mirroring

Sales

Creating a new sales order

Invoicing

Purchasing

Document releasing and approval process

Deleting sales and purchase documents

Document tables and row level locking

Inventory management

Items

Locations

Variants

Stock keeping units

Sales pricing

Item ledger entry application

Value entries

Transfer orders

Requisition journals

Warehouse management

Warehouse strategy levels

Location setup

Bin code | level 1

Receipt and shipment | level 2

Put-Away and Pick | level 3

Receipt + use put-away worksheet | level 4

Directed put-away and pick | level 5

Implementing and customizing warehouse management

Reservations

Scenario

Always versus optional reservation

Reservation entries

Creating a reservation

Order tracking policy

Trade in vertical industries

Fashion

Automotive

Pharmaceuticals/medicines

Food

Furniture

Summary

Chapter 7: Storage and Logistics

How to read this chapter

Chapter objects

The process

Using standard features

Defining the modules

The storage application

Documents

Look, learn, and love

Designing the table and posting schema

Getting started

Opening balance

Products

Registration worksheet

Storage documents

The logistics application

Designing the table and posting schema

Getting started

Incidents

The invoicing application

Process

Income and expense

Invoicing

Pricing methodology

Periodic invoicing

Combined invoicing

Add-on flexibility

Value added logistics

Item tracking

Third and fourth party logistics

Summary

Chapter 8: Consulting

The process

Fits

Gaps

Getting started

How many jobs

Job task and planning lines

Job journal

Job examples

Time sheets

Purchasing

Invoicing

Calculating Work in Progress

Changing jobs

Quantity budgeting

Resource groups

Calculations

Issue registration

Time sheet

Summary

Chapter 9: Interfacing

Interface types

Import and export

Event driven versus timer driven

Interfacing technologies

File

Automation Control and OCX

ODBC/ADO

SQL Server interfacing

C/FRONT

Microsoft Message Queue

Web services

Client add-ins

Standard application interfaces

Office integration

Advanced Excel integration

Outlook integration

SharePoint

BizTalk

Client Add-ins

Interface methodologies

The scenario

The design

The scenario

Interfacing into the future

SharePoint client in Microsoft Dynamics NAV "7"

Microsoft Dynamics CRM

Windows Azure

Summary

Chapter 10: Application Design

Application lifecycle

Design to use

Design to maintain

Design to support

Design to upgrade

Design to perform

Design to analyze

Version and object management

What is a version

Version numbering

Creating a version

Development methodology

A sample approach

The project

Standard, customized, or both

Roadmap to success

Summary

Appendix: Installation Guide

Licensing

Installing Microsoft Dynamics NAV

Changing the license

Installing the objects

Importing a FOB file

Installing the dynamic link library files

Thank you for buying Microsoft Dynamics NAV 2009 Application Design

Chapter 1: Introduction to Microsoft Dynamics NAV

Once Upon a Time; this is how fairytales often start and even though the story of Microsoft Dynamics NAV is anything but a fairytale, it sure has some magic.

With more than 1,350,000 seats and 75,000 installations it is one of the most popular ERP packages in the mid market. In this book, we will go through the magic of the Dynamics NAV application. We'll see how Dynamics NAV will give better information on how our business is doing and better insight into where the processes can be optimized or need to be changed.

In this chapter, we'll discuss the basic principles of the Microsoft Dynamics NAV application, how it's structured and why. After reading this chapter, you will have a better understanding of what to expect when implementing and designing Microsoft Dynamics NAV.

Versions and history

At the time of publishing this book, Microsoft Dynamics NAV 2009 (6.0) SP1 is the most recent version of the product. When the Windows version was first introduced in 1995, the product was called Navision Financials 1.0. The Danish software company that originally developed the product, Navision Software A/S, was not yet acquired by Microsoft and it was a revolution. It was a full Windows product and had all the basic functionality that small companies needed. It is important to understand that the original version was targeted at smaller companies.

Since then, we have had many (20+) versions. All new versions contained new functionality and with that, the product has gotten more mature and more suitable for bigger companies. This was especially empowered with the support of the Microsoft SQL Server platform allowing more concurrent users to work in the same application areas.

Until version 5.0, the technology of the product did not change. The original intention of Microsoft was to release a new technology platform together with the new functional changes. This turned out to be a very difficult task so they decided to split the improvements into two releases. Version 5.0 contains new functionality and improvements, whilst version 2009 or 6.0 which is the technical release number, is a technology release.

The technical challenge was to migrate from the old C++ platform to .NET and to move from a two tier to a three tier technology. This was also the first release with a drastic change in the user interface. Microsoft Dynamics NAV 2009 contains an entirely new user interface, the "Role Tailored Client", built new from the ground up—the existing ("Classic") user interface is the same with no changes. During this migration process, all application functionality was frozen although small improvements and bug fixes were made in 2009 SP1.

This book supports functionality from both the 5.0 and 2009 release even though we decided to use the new 2009 interface for all user interface screenshots and pages for the development examples. As the development environment is only available in the classic client, we have taken these screenshots from there.

What is this book about

The title of the book is "Microsoft Dynamics NAV 2009 Application Design". What does Application Design mean? And what does it mean in Microsoft Dynamics NAV 2009?

Microsoft Dynamics NAV 2009 is a very complete ERP package, but unlike other ERP packages it has a design capable of providing an open structure and a development platform. The idea is to provide 80% of the solution out of the box and allow the other 20% to be designed by qualified business application developers.

The partner channel is a unique part of Microsoft Dynamics NAV. From the first moment that Navision was introduced, company management decided that it would only make sense to have an indirect selling model and to let the resellers (called partners) have the availability to change the product and add new functionality.

This book is about both the 80% and the 20%. We'll see that the percentages differ as per the industry where it is applied. Some industries have close to a 100% fit while others have a need for 80% development.

So there is a thin line in this book between using the standard application and designing changes and expanding the product. Although this is not a development book, we'll dive into code and objects in almost every chapter.

To understand the code it should be enough to read this chapter but if you want to know more we highly recommend reading "Programming Microsoft Dynamics NAV 2009" written by David Studebaker and also published by Packt.

This book is not a manual for Microsoft Dynamics NAV 2009. It should give a clear idea of how the structure of the application is laid out and about its possibilities. We do not want to replace or rewrite the Microsoft Documentation but rather want to provide ideas you might not have thought about.

Setup versus customization

In Microsoft Dynamics NAV, the line between implementing and developing is very thin. Where you would do a lot of setup in other ERP packages, you'll see that it often makes more sense in Dynamics NAV to make a change with the Development Tools.

The standard package is very complete in its functionality but does not support all industries. It is more a framework for Partners to work with. In this book, we will explain this framework and what philosophy it is built on. Understanding this philosophy is critical to knowing how to expand the functionality.

But, expanding the functionality means customizing the application. Do end-users in 2009 still want customized applications? Mostly they will say they don't want their software customized, but in the next breath, they will say that the software should change to match their way of doing business, and that they should not have to change their business to fit the software.

This is why Microsoft pushes their Partners to create horizontal and vertical solutions on top of the standard product and release these solutions as products with their own versions like it was part of the standard applications. This way of using the partner channel is a unique concept that has proven to be very successful and has made Microsoft Dynamics NAV useable in almost any industry.

Most companies, however, have such a unique way of working that they will always require more or less customized solutions. The total cost of ownership depends on the level of customizations and how these customizations are designed.

The key is knowing when to do setup and when to do a customization. Only a solid understanding of the application will help you determine which is correct.

After reading this book, you will know how to design your application best to have a good balance between cost of ownership and functionality.

The beauty of simplicity

As discussed earlier, the application is designed to be expanded and changed by external partners. When this Partner program was created, a decision was made that partners could only do a good job if the application was completely open for them to add and change. This philosophy is very important to understand when you first start implementing or changing Microsoft Dynamics NAV.

Partners can change all business logic in the application. They can add new fields to tables and create their own tables. The only thing they cannot do is delete fields from the tables in the base application.

As you can see, Microsoft Dynamics NAV is an extremely flexible and open product with a lot of freedom. But with freedom comes responsibilities. In Dynamics NAV, you are responsible for the housekeeping in your system.

Horizontal versus vertical solutions

Because of this open system, partners have created thousands of smaller and larger changes to the system. Some of these changes were bundled into new functional pieces and called "add-ons". These add-ons are often solutions that change Dynamics NAV into a product for a specific industry rather than a generic ERP system. Other add-ons are specific features that can be used in all industries like EDI or Workflow. Microsoft calls the industry specific add-ons verticals and the generic add-ons horizontals.

Open source

Even though Dynamics NAV has an open source for their partners, it does not come fully equipped with a development environment like most developers are used to. It has a customization tool that lets you customize the application like you would customize another ERP system with settings. This customization tool is a basic tool that is nice to work with but misses some development features such as version control and intellisense. This makes it more difficult to keep track of your changes.

Structure of this book

This book will cover most functional elements of Dynamics NAV in a number of vertical industries. We will do this in a supply chain matrix. The specific industries we will look at are fashion, automotive, medicines, food, and furniture. For production and trade we will look at the general process and we will see how consultancy and distribution companies help in this process.

The following image shows how this book is structured:

For all these industries we will look at what parts of the standard product can be utilized and where we need vertical solutions. We'll discuss how these vertical solutions will interface with the standard package or maybe even change the behavior of the standard product.

Two parts of the product however are so general in their use and usability for all industries that we'll discuss them in their own chapter. These are FinancialManagement and RelationshipManagement.

To emphasize the strength of the vertical concept, we'll design and create a vertical solution for a distribution company.

Now we will look at some of the basic concepts of the application.

The Role Tailored concept

With the NAV 2009 release, Microsoft marketing decided to introduce the concept of Role Tailored ERP. Until now, most ERP systems were module driven, which means that the application has an area for finance, CRM, sales, purchasing, and so on. The access to the individual modules was separated. A purchaser needs to switch to sales in order to see the sales orders.

Most people in a company have specialized tasks that the ERP system should support. In a classic ERP interface, the users would have to decide themselves which parts they need. This has changed.

This is a "purchaser's" Role Center. As you can see, all the information needed by this person in the organization is in one place and usable in a workflow-like way. Also, the SalesOrders are accessible from the main menu. It is completely different to the menu found in version 5.0 or before

However, the Role Tailored concept is not new. Dynamics NAV partners have been implementing it for many years. In the classic menu, it was extremely easy to create new menus and most companies implemented their own menus per role. When the 'Microsoft Outlook' style Menu Suites where introduced in version 4.0, end users could create shortcut Menu Suites and these also quickly became role centers. You can clearly see that the role tailored concept is like coming home for Dynamics NAV.

The building blocks

To understand the development examples in this book, we will discuss some of the basic building blocks of Microsoft Dynamics NAV 2009.

Like all database applications, it starts with tables. They contain all the information displayed in a structured way. It is important to understand that the tables of Microsoft Dynamics NAV are not completely normalized. The tables are structured in the way the user interface works. This makes it easy for non- technical people to understand the data model. We'll discuss the unique structure of the application in the next chapter.

Tables, however, not only contain data, they contain business logic as well. As they are structured like the functionality in the database, tables contain simple functions like address validation, and more complex functions for VAT and discount calculation.

Whenever functionality gets more complex or can be shared across the application, it is better to move them to the Codeunit object. These are containers of business logic for a special purpose.

For the user interface there are three object types: Forms, reports, and pages. The first and latter are intended for user input. Reports are originally intended to be printed on paper but with the current status of technology, they are more and more used as information dashboards combining management information with drill-through possibilities.

Forms and pages are tightly linked to each other. Each form object has a page object with the same number and name. The form object is used in the 'Classic Client' only whilst the pages are used in the 'Role Tailored Client'.

The report object is used in both interfaces but has two layouts—a black and white layout for the Classic client and a RDLC layout for the Role Tailored client that supports colors and graphs.

As the tables are structured in the way the application works, the forms and pages are bound to one table. For people new to this concept, it sometimes takes a while to get used to this.

The Menu Suite defines the way the navigation is structured when people leave their Role Centers, or when using the Classic Client which does not support Role Centers.

The last two object types are external interfacing objects. Data ports and XML ports make it possible to import and export data in and out of the system.

For this book, the table and page objects are the most important to understand. Most of this book, however, can also be applied to older versions but then forms should be applied wherever this book addresses pages.

Tables as user interface and business logic

The table object in Microsoft Dynamics NAV is very important. As it is not normalized, it contains a lot of information about how the database works.

For example the Job Card (88) is built on one table, the Job (167). This table contains all fields required for this screen.

In a traditional development environment this screen would have a transaction GetJobData and UpdateJobData. These transactions would read the information from the database, map them to the screen, and save the information in the database if the user if finished. However, in Microsoft Dynamics NAV, all fields that are displayed in the interface are stored in one table. This makes it possible for the screen to have built-in triggers to get the data and update the database.

The table object then contains the business logic required for this document. Let's have a look at some of the fields in this table.

In this table you will see see a lot of fields that are required for a Job likeWIPMethod, CurrencyCode, and so on. But when we click on the C/ALCode icon and focus on Currency Code we get this.

Currency Code - OnValidate()

IF "Currency Code" <> xRec."Currency Code" THEN

IF NOT JobLedgEntryExist THEN

CurrencyUpdatePlanningLines

ELSE

ERROR(Text000,FIELDCAPTION("Currency Code"),TABLECAPTION);

It contains business logic that gets executed every time something happens with this field. In this case, the currency factor is recalculated and updated in the Sales Lines.

So, the tables in Microsoft Dynamics NAV are not just data containers, they are the foundation for both the business logic and the application workflow.

Dynamics NAV in throughout supply chain

The Dynamics NAV product is used almost everywhere in the business supply chain. This is mainly because it is a highly customizable ERP system. Dynamics NAV is used in the classical supply chain companies like manufacturing plants, wholesale companies, and in retail with or without many changes. But with an add-on, the product is also used in transportation companies or in the recycling industry.

In order to understand this better, it is important to know how companies work. A company is a person or a group of persons using materials and resources to deliver a product or a service to other companies or end consumers. A group of companies working together is called a supply chain. Dynamics NAV can be used in all these companies although it is traditionally used in companies with 5 to 250 concurrent users.

In order to serve this process, Dynamics NAV has a list of basic modules:

Financial management: Traditionally, financial management was used in companies to comply with federal regulations of bookkeeping. For entrepreneurs starting their business, this is usually the part they least like. However, good bookkeeping can give a clear view on the company's well being and support strategic decisions with good financial information.Inventory: Every company that grows will reach a certain point where it is no longer possible to handle inventory without a system. Keeping too much inventory is expensive. A good inventory system can help you keep your stock management as efficient as possible.Relationship management: When it comes to people, a company is not only dealing with customers and vendors. RM will help you keep track of every company and person your company is dealing with.Sales: The sales process is usually the place where businesses make money. The system will help you keep track of orders that your customers place.Purchasing: The purchasing department is usually split in two pieces. One piece is the purchasing of goods the company needs for itself. This facility management can grow into a business of its own at large companies. The other purchasing part is buying the materials and resources you need for your sales process. For some trading companies, this can even be a drop shipment process where you never have the purchased goods in house.Warehouse management: Warehouses are getting bigger and bigger, making the need for a system that supports the picking and put-away process even greater. This is usually tightly connected to the sales and purchasing process.Manufacturing: When you make products yourself, you need a system that helps you create a new item from one or more purchased materials and resources.Jobs: In some companies the process of delivering a service is so complex that it requires its own administration process. Time and billing is usually a very important process for these companies.Service management: This supports the service process handling warranty and necessary periodical maintenance of your items.

Some basics

Microsoft Dynamics NAV has some basic structures that are reused throughout the application and are necessary to understand before you read the rest of this book.

Number series

Databases need unique records. The application has two ways of making this happen.

Some tables have automatic incremental numbering that cannot be influenced. These are often accounting tables that have auditable purposes. Examples of these tables are G/L entries, G/L registers, and VAT entries.

The other way is using a flexible alphanumeric code. In some setup tables, users are free to create their own numbers, like in the location table, but most of the time, number series functionality is used. These can be influenced by the end user depending on their access rights. Let's have a closer look at those:

Users can define their own numbering, usually starting with an alphanumeric character. Numbering can be done automatically, manually, or in a combination. Numbers can have a starting date and incremental number. This way you can number your Sales Invoices SI11-0001. SI means SalesInvoice. 11 means 2011 and 0001 is the incremental number.

Number series can be linked to each other making it possible to have a different number series for national and international customers.

Extended text

Most master data tables in Microsoft Dynamics NAV have two description fields but it is possible to add extra text.

The text can be defined for all languages in the system and valid for a specific period.

We can enable or disable using the text for most documents available in the system, so we can have a long text for the SalesQuote and a shorter text for the SalesInvoice.

Navigate

The main reason Microsoft Dynamics NAV consultants like you to use numbers as SI11-0001 is the Navigate functionality. This functionality makes it possible to find all information in the database linked to this document. If you were to call your Sales Invoice 110001 and your Purchase Invoice the same, the system would not be able to find the correct information.

When Navigating on PostedSalesInvoice103006 in the CRONUS Demo database, we get all the information that is linked to this number.

Navigation shows both documents and entries. Using the Show option, we can drill down into the records and go even deeper into the information.

Setup tables

An ERP application can be used in many different ways and to make it work in the way we want, we need to set it up correctly. We already discussed that Dynamics NAV has far less setup work required than other ERP packages and is more likely to be changed but nonetheless, there is setup work to do.

Every part of the application has its own setup table. There are also some application-wide or cross application setup tables. During the implementation, we need to make sure to touch all of these tables. Changing these setups after the implementation should be done with great care.

This list shows all Microsoft Dynamics NAV setup tables grouped by type.

When we open a setup from the application, we see several options, including the numbering we discussed earlier.

Posting groups

Microsoft Dynamics NAV is very flexible in its posting to the GeneralLedger. This is set up in posting groups. These form a matrix which is filtered out by the application.

Most application areas have one or more posting group tables:

Customer posting groupVendor posting groupInventory posting groupJob posting groupGen. Business posting groupGen. Product posting groupBank account posting groupVAT business posting groupVAT product posting groupFA posting group

We'll discuss posting groups in more detail in Chapter 3, Financial Management.

Pricing

When it comes to pricing and discounts, Microsoft Dynamics NAV has a very simple, yet effective way of calculating prices.

All sales and purchase prices are stored in four simple tables.

7002—Sales Price7004—Sales Line Discount7012—Purchase Price7014—Purchase Line Discount

The system finds the appropriate price by filtering down in these tables. The narrower the filter, the more likely the price is applied.

For example: The normal price of item 1972-W on the item card is 974,80 but from 1-1-2011 it is 843,345.

The filtering is done in Codeunits Sales Price Calc. Mgt. (7000) and Purch. Price Calc. Mgt. (7010). We'll discuss this structure in Chapter 2, An Example Application where we will also create such a structure for our own application.

Dimensions

Throughout the application, an unlimited number of dimensions can be used to analyze the data. These dimensions are inherited from master data tables.

The application has two global dimensions that are directly posted into each transaction. Six other dimensions can be defined as shortcut dimensions to be directly used in journals and documents. An unlimited number of additional dimensions can be added but need to be accessed with additional effort.

This screenshot shows how Global and Shortcut Dimensions can be used in a Sales Document.

As discussed earlier, Microsoft Dynamics NAV has built-in OLAP possibilities. It allows us to create cubes to be analyzed within the application or in SQL Server analysis services. .

Although the cubes can be updated real time during posting, it is highly recommended to update them periodically in a batch. Also, the number of dimensions has an impact on the performance of the system.

Data model principles

Microsoft Dynamics NAV has some specific data model principles that are very important to understand before you can create your own structure. The building blocks are layered and reused and rely on each other in order to secure data integrity.

Master data