上QQ阅读APP看书,第一时间看更新
NAV object and system elements
Here are some important terms used in NAV:
- License: A data file supplied by Microsoft that allows a specific level of access to specific object number ranges. NAV licenses are very clever constructs that allow distribution of a complete system: all objects, modules, and features (including development), while constraining exactly what is accessible and how it can be accessed. Each license feature has its price, usually configured in groups of features. Microsoft Partners have access to full development licenses to provide support and customization services for their clients. End-user firms can purchase licenses allowing them developer access to NAV. A Training License can also be generated, which contains any desired set of features and expires after a specified period of time.
License limits
The NAV license limits access to the C/AL code within tables, pages, and codeunits differently than the C/AL code buried within reports or XMLports. The latter can be accessed with a lower level license (that is, less expenspe). If a customer has license rights to the report designer, which many do, they can access C/AL code within Report and XMLport objects. But access to C/AL code in a table, page, or codeunit requires a more expenspe license with developer prpileges. As a result, C/AL code within tables, pages, and codeunits is more secure than that within report and XMLport objects.
- Field: An indpidual data item, defined either in a table or in the working storage (temporary storage) of an object.
- Record: A group of fields (data items) handled as a unit in many operations. Table data consists of rows (records) with columns (fields).
- Control: In MSDN, a control is defined as a component that provides (or enables) user interface (UI) capabilities.
- Properties: These are the attributes of the element such as an object, field, record, or control that defines some aspect of its behavior or use. Example property attributes include display captions, relationships, size, position, and whether editable or viewable.
- Trigger: Mechanisms that initiate (fire) an action when an event occurs and is communicated to the application object. A trigger in an object is either empty, contains code that is executed when the associated event fires the trigger, or only contains comments (in a few cases, this affects the behavior of the trigger). Each object type, data field, control, and so on may have its own set of predefined triggers. The event trigger name begins with the word On, such as OnInsert, OnOpenPage, or OnNextRecord. NAV triggers have similarities to those in SQL, but they are not the same (similarly named triggers may not even serve similar purposes). NAV triggers are locations within objects where a developer can place comments or C/AL code. When we view the C/AL code of an object in its designer, we can see non-trigger code groups that resemble NAV event-based triggers:
- Documentation: This can contain comments only, no executable code. Every object type except MenuSuite has a single Documentation section at the beginning of the C/AL code.
- Functions: These can be defined by the developer. They are callable routines that can be accessed by other C/AL code from either inside or outside the object where the called function resides. Many functions are provided as part of the standard product. As developers, we may add our own custom functions as needed.
- Object numbers and field numbers: All objects of the same object type are assigned a number unique within the object type. All fields within an object are assigned a number unique within the object (that is, the same field number may be repeated within many objects whether referring to similar or different data). In this book, we will generally use comma notation for these numbers (fifty thousand is 50,000). In C/AL, no punctuation is used. The object numbers from 1 (one) to 50,000 and in the 99,000,000 (99 million) range are reserved for use by NAV as part of the base product. Objects in these number ranges can be modified or deleted with a developer's license, but cannot be created. Field numbers in standard objects often start with 1 (one). Historically, object and field numbers from 50,000 to 99,999 are generally available to the rest of us for assignment as part of customizations developed in the field using a normal development license. Field numbers from 90,000 to 99,999 should not be used for new fields added to standard tables as those numbers are sometimes used in training materials. Microsoft allocates ranges of object and field numbers to Independent Software Vendor (ISV) developers for their add-on enhancements. Some such objects (the 14,000,000 range in North America, other ranges for other geographic regions) can be accessed, modified, or deleted, but not created using a normal development license. Others (such as in the 37,000,000 range) can be executed, but not viewed or modified with a typical development license.
The following table summarizes object numbering practice:
- Events: Functions can subscribe to events that are raised in the system. NAV 2017 has both platform and manual events. Functions can also be used to raise events.
- Work Date: This is a date controlled by the user operator. It is used as the default date for many transaction entries. The system date is the date recognized by Windows. The work date that can be adjusted at any time by the user, is specific to the workstation, and can be set to any point in the future or the past. This is very convenient for procedures such as the ending sales order entry for one calendar day at the end of the first shift, and then entering sales orders by the second shift dated to the next calendar day. There are settings to allow limiting the range of work dates allowed. The work date can be set by clicking on arrowhead dropdown below the Microsoft Dynamics icon and selecting the Set Work Date... option:
- Clicking on Set Work Date... in the dropdown options displays the Set Work Date screen. Or click on the date in the status bar at the bottom of the RTC window. In either case, we can enter a new Work Date: