Paul M. Diffenderfer Samir El-Assal Microsoft Dynamics NAV
IT Stochastic Petri Nets by Falko Bause and Pieter S. Kritzinger From Enterprise Architecture to IT Governance by Klaus D. Niemann ISSE/SECURE 2007 Securing Electronic Business Processes by Norbert Pohlmann, Helmut Reimer and Wolfgang Schneider Understanding MP3 by Martin Ruckert Process Modeling with ARIS by Heinrich Seidlmeier Computing in Russia by Georg Trogemann, Alexander Y. Nitussov and Wolfgang Ernst (Eds.) Computing Fundamentals by J. Stanley Warford www.viewegteubner.de
Paul M. Diffenderfer Samir El-Assal Microsoft Dynamics NAV Jump Start to Optimization 2nd revised Edition With 209 Illustrations
Bibliographic information published by the Deutsche Nationalbibliothek The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available in the Internet at http://dnb.d-nb.de. This book is the revised 3rd edition of the German book Profikurs Microsoft Dynamics NAV ( Vieweg+Teubner 2008) now offered to the English speaking audience by the original authors. 1st Edition 2006 The title of this edition was Microsoft Navision 4.0. 2nd revised Edition 2008 All rights reserved Vieweg+Teubner GWV Fachverlage GmbH, Wiesbaden 2008 Editorial Office: Sybille Thelen Andrea Broßler Vieweg+Teubner is part of the specialist publishing group Springer Science+Business Media. www.viewegteubner.de No part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the copyright holder. Registered and/or industrial names, trade names, trade descriptions etc. cited in this publication are part of the law for trade-mark protection and may not be used free in any form or by any means even if this is not specifically marked. Cover design: KünkelLopka Medienentwicklung, Heidelberg Printing company: MercedesDruck, Berlin Printed on acid-free paper Printed in Germany ISBN 978-3-8348-0516-4
preface to 2 nd english edition What was once simply Navision, became Navision Financials which became Navision Attain, then Microsoft Navision and is today called Microsoft Dynamics NAV. What is important to the loyal owner or user is that the ERP world behind the changing name is the same excellent quality they have come to trust. The newest version, Microsoft Dynamics NAV, is a continuation of this tradition of quality. This book is intended to serve companies and individuals using a wide range of versions within the Navision tradition. Therefore, the authors concentrate on the more essential deep features and concepts that remain largely unchanged despite the uneasy reality of shifting product names. Following the adage, Teach a boy to fish and he ll feed his family for a life time, the authors have developed examples that strengthen the reader s intuition, encouraging him or her to think deeply about the system so that they have the confidence and tools to strike out on their own and explore the endless opportunities for optimization made possible through Microsoft Dynamics NAV. Whether or not you master the coding techniques covered in this book, you will become a better judge of the quality of others work. As you probably already know, the ERP system is the heart of your enterprise, and therefore, you should not trust just anyone to do open-heart surgery on it. This book will help you develop a vision for successfully administering an ERP implementation even if you do none of the programming and physical implementation yourself. Readers are invited to contact the authors directly via email at: pdiffenderfer@yahoo.com, if more specific Microsoft Dynamics NAV assistance not otherwise covered in this book is needed. Likewise, mention must be made of the best source for Microsoft Dynamics NAV online help, www.mibuso.com. Thanks MIBUSO for getting us all professionals as well as amateurs out of the odd, technical quandary! Special thanks to Jill L. Keehner for the intense editing she did to improve this book the 2 nd english edition of a book that has for too long straddled a precarious line of bilingual ambiguity. Paul Diffenderfer and Samir El-Assal February 2008, Frankfurt, Germany V
preface to 1 st english edition In the last year and a half, worldwide interest in the ERP solution Microsoft Navision has more than doubled and with good reason. Microsoft Navision already enjoyed a broad and solid utility when it was purchased by Microsoft in early 2002, and now with the leadership and resources of Microsoft this ERP solution has quickly and dramatically improved in new and promising areas. Microsoft Navision is truly a comprehensive solution to the complex business information management and analysis problems experienced by medium to small-sized firms. Whether you are operating a production or merchandising firm or a purely service-based establishment, Microsoft Navision has tools that can streamline and optimize your information infrastructure. This is the third edition of the successful book Microsoft Navision optimiert einsetzen. In this book the authors attempt to discuss some of these new technologies as well as continue to offer an introduction to Microsoft Navision s deeper structure and programming conventions, which by and large have remained a stable and unchanged basis for the recent software developments. As ever, the reader is encouraged to test the examples while studying this book. It suggested that one make use also of the abundant reference resources included on the Microsoft Navision demonstration CD in PDF format as well as the software s extensive on-line help files. If you do not have a copy of this demonstration CD please contact your Microsoft Business Solutions Center or see www.mibuso.com and they will be able to supply this for you. The purpose of this book is to help the reader overcome the danger of becoming overwhelmed by the size and complexity of the software and its resources. Therefore this book will be an aid in building a sense of the important themes, themes that will develop the right intuition in the reader and thus make her or him able to embark on successful self-instruction projects in the future. Mastering Microsoft Navision use and development can be the key to giving your company the quality and efficiency that will win you and your firm a profitable and effective future. We wish to make a special note of thanks to a few individuals and organizations whose kind and expert help has been necessary to bring this book to the public. VI
Firstly Dr. Reinald Klockenbusch whose excellent guidance and trust have been the origin and prime mover in Vieweg Fachverlag s publication of the first and second edition of this book. Secondly a loud applause is due Sabine Thiele in her lightning fast and expert translation work done for both German editions. We would like to thank the team at TONACO GmbH for patience and dedication to ever further optimisation of their Microsoft Navision ERP system. The examples in this book are larger taken from a real and tough day in the life of TONACO GmbH. Also we wish to thank B.I.Team Softwareberatung for providing demonstration software as well as high quality and professional support. Paul Diffenderfer and Samir El-Assal Washington DC, May 2005 VII
to Poet of a democratic religion VIII
table of contents 1 The ERP Philosophy...1 1.1 Promises of an ERP system...1 1.2 The Potential Dangers of Implementing an ERP System...3 1.3 Strategies to Win the Promises and Avoid the Dangers...7 2 Architecture, Login and Test System Creation...11 2.1 Login...11 2.2 Creating a Microsoft Navision Test Database...14 2.2.1 The Benefits of Having a Test Copy...14 2.2.2 Learning About Your Database...16 2.2.3 Creating the Backup Packet...17 2.2.4 Creating a New Database Shell and Installing Your Backup...19 2.2.5 Installing Your Microsoft Navision License Data...20 2.2.6 Importing the Database Backup...22 3 The Microsoft Navision User Environment...25 3.1 Handling Navigation and Graphic Tools...25 3.2 Handling Complexity with Filtering Techniques...29 3.2.1 Basic Types of Information...29 3.2.2 Two Types of Filters...30 3.2.3 Filtering Example in the Chart of Accounts...32 3.2.4 Filter Options...39 3.3 Sorting...41 3.4 Implementing Menu, Filtering and Sorting Knowledge...45 3.4.1 Searching for the Correct Customer...45 3.4.2 Viewing Fields with Zoom...49 3.4.3 Creating a Sales Order...51 3.4.4 Looking Deeper into the Flow Field Inventory...56 IX
table of contents 4 Introduction to Development Concepts...61 4.1 The Challenges in Organizing Information...61 4.2 Organizing Information Using Table Relations...63 4.2.1 How Not to Organize Data: A Negative Example...64 4.2.2 Table Relations: Maintaining the Integrity of Your Information..66 4.2.3 Relational Data System Example: The Sales Order...67 4.3 The Importance of Presentation...75 4.3.1 Different Views for Different Purposes and Users...76 4.3.2 General Ledger Account Table: Two Distinct Views...76 4.4 Object Designer: The Development Environment...87 4.4.1 Entering the Inner Structure of Microsoft Navision...87 4.4.2 Working With Table Objects...88 4.4.3 Data Type...90 4.4.4 Creating a New Form...94 4.4.5 Adding New Standard Filtering Options to a Report...110 5 Creating New Flow Fields...115 5.1 Connecting a Variable With Its History...115 5.2 Connecting Salespeople To Their Sales...115 5.2.1 Clearly and Operationally Defining Sales...115 5.2.2 The New Sales Flow Field: Searching For the Correct Fields...116 5.2.3 Visualizing the Table Relationships Behind the New Sales Flow Field...124 5.2.4 Inserting the Total Sales Flow Field in the Salesperson/Purchaser table...125 5.2.5 Indexing the Sales History For the New Sales Flow Field...132 5.2.6 Presentation of the New Flow Field...134 6 Creating a New Report...137 6.1 Creating a Hard Copy of New Sales Information...137 6.2 Searching For the Sources of Data...137 6.3 Diagram of the Table Relationships For the New Report...145 6.4 Diagram of Information Flow Behind the Report...145 X
table of contents 6.5 Introduction to Report Designer...148 6.5.1 DataItem Structure...149 6.5.2 General Report Properties...156 6.5.3 Designing a Report Printout...158 6.5.4 Comparing the Section Designer With the Info-Flow Diagram.163 6.5.5 Building Output Sections...163 6.5.6 Creating Original Information Within the Report...185 6.5.7 Viewing the Report...214 7 Introduction to Powerful Code Techniques...215 7.1 A Practical Approach to Development...215 7.2 Syntax and Style...217 7.2.1 Dealing With the Rigor of a Programming Language...217 7.3 The Sentence: The Most Basic Unit of Syntax...220 7.4 Referring to Variables...221 7.5 Inserting a Value Into a Variable...222 7.6 Implications...222 7.7 Looping...225 7.8 Globals and C/AL Functions: Establishing Table Relations...226 7.8.1 Calling Foreign Table Information...227 7.8.2 FIND: Searching For a Specific Record in Tables...233 7.8.3 Representation of the Item Relationships...239 7.9 C/AL Calculation Functions...241 7.9.1 Elementary Operators...241 7.9.2 Incompatibility Problems with Data Type...242 7.9.3 POWER: Calculating Exponents...243 7.9.4 ABS: Using Absolute Numbers...244 7.9.5 ROUND: Rounding Decimals...244 7.9.6 CALCDATE: Calculating Dates...245 7.9.7 CALCFIELDS: Controlling Flow Fields with C/AL Code...246 7.10 Option: Special Data Type...253 7.11 MESSAGE and ERROR: Sending Information to the User...254 7.12 Data Editing Functions...254 XI
table of contents 8 Using Dataports to export & import Navision Data...267 8.1 Simple Export from Navision...267 8.2 Complex Export from Navision...282 8.3 Creating an Import Dataport...289 8.3.1 Importing new records into the Item table...289 8.3.2 Preparing neighboring tables for Item import...296 index...301 XII