Book Image

Learning Dynamics NAV Patterns

By : Marije Brummel
Book Image

Learning Dynamics NAV Patterns

By: Marije Brummel

Overview of this book

Microsoft Dynamics NAV is a complete ERP system, which also contains a robust set of development tools to support customization and enhancement. These include an object designer for each of the seven application object types, a business application-oriented programming language with .NET interface capability, a compiler, a debugger, and programming testing language support. Learning Dynamics NAV Patterns will guide you through the NAV way of solving problems. This book will first introduce you to patterns and the software architecture of the NAV and then help you to build an example application. Then, it walks you through the details of architectural patterns, design patterns, and implementation patterns. This book will also talk about anti-patterns and handling legacy code. Finally, it teaches you to build solutions using patterns. Proven patterns and best practices will help you create better solutions that are easy to maintain in larger teams across several locations. It will guide you through combining abstract patterns using easy-to-understand examples and will help you decide which patterns to use in which scenarios.
Table of Contents (9 chapters)
8
Thank you for buying Learning Dynamics NAV Patterns

Copy Document Pattern

Entering a Document with all the options and multiple lines can be a lot of work, and sometimes similar Documents already exist in the system. This is often a reverse action of the Document History Pattern, but we can also copy the outstanding documents.

An explanation on the use of Copy Document Pattern is available at https://www.youtube.com/watch?v=aTiwroXwW_0&list=PLhZ3P-LY7CqmVszuvtJLujFyHpsVN0U_w&index=17.

An example of this is creating a Credit Memo from a Posted Sales Invoice where all the information is copied, including the Customer, Items, and the correct posting dates.

Technical description

The Copy Document Pattern objects are a Processing Only Report that calls into an internal function called the Codeunit. The Report object needs to understand the valid options to copy the data around. We can, for example, copy a Posted Sales Shipment to a Sales Order, but we cannot copy a Sales Order to a Posted Sales Invoice.

The direction...