Professional Documents
Culture Documents
sriram.msdnav@gmail.com
The product 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. Value-
added resellers (VAR)s can have full access to the business logic source code, and it
has a reputation as being easy to customize.
The company was founded in 1983 in Denmark as PC&C A/S (Personal Computing
and Consulting).[2] In 1984 they released their first accounting package called
PCPlus. It was for its time a very user-friendly single user package with all the basic
accounting functionality. In 1987 the first version of Navision was released. [3] This
was also their first client/server based package allowing multiple users to access
the system simultaneous.
Until 1990 the system was primary sold in Denmark, Iceland and Germany. But
with the release of Navision version 3 (of the character-based system) a heavy
international expansion was initiated and distributors and localized versions became
available in many other countries.
In 2000, Navision Software A/S merged with fellow Danish firm Damgaard A/S
(founded 1983) to form NavisionDamgard A/S.[4] Later the name was changed to
Navision A/S.
On 11 July 2002 Microsoft bought Navision A/S to go with its previous acquisition of
Great Plains. The new division in Microsoft was named Microsoft Business Solutions
and also included Microsoft CRM.[5][6]
In 2003 Microsoft announced their plans to develop an entirely new ERP system
(Project green). But later it was decided to continue development of all ERP
systems (Dynamics AX, Dynamics NAV, Dynamics GP and Dynamics SL). All four
ERP systems will be launched with the same new role based user interface, SQL
based reporting and analysis, SharePoint based portal, Pocket PC based mobile
clients and integration with Microsoft Office.
In December 2008 Microsoft released Dynamics NAV 2009, which contains both the
original "classic" client, as well as a new three-tier GUI called the RoleTailored
Client (RTC).[8]
The product itself has gone through several name changes over the time. Initially
Navigator was used in Denmark, although most Danes knew it as IBM-Navigator, as
IBM was the distributor. Internationally it was sold as Navision, except for the US
where it was called Avista. The names "Navision Financials", "Navision Solutions",
"Navision Attain", "Microsoft Business Solutions - Navision Edition", and the current
"Microsoft Dynamics NAV" (pronounced N-A-V) have all been used to refer to this
product.
Navision Financials 1.00: 1.00, 1.00A, 1.00B, 1.10, 1.10A, 1.20, 1.30
Navision Financials 2.00: 2.00, 2.00A, 2.00B, 2.00C, 2.01, 2.01A, 2.01B
Microsoft Business Solutions NAV 4.00: 4.00, 4.00 SP1, 4.00 SP2, 4.00 SP3
1983 - The company PC&C was founded founded by Jesper Balser, Peter Bang and
Torben Wind in Copenhagen, Denmark.
1984 - Launch of PCPlus in Denmark & Norway a character-based accounting
solution for SOHO (small office/home office) market.
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
2007 - Navision version 5.0 was released. But without the new user interface, but
with many new application features such as a completely redesigned Job module.
The job module had basically not changed since the release of Navision 3.01 (the
character based version in 1990).
2008 - First Microsoft announced that the name of the next version of Navision
would not be Navision 5.1, but Dynamics NAV 6.0. Just a few months later they
changed it so that it would be Dynamics NAV 2009 and it would be released in Q4
2008.
2008 - At Convergence in Copenhagen in November 2008 Dynamics NAV 2009
was finally released. Included in the new version was:
The new client is released as the RoleTailored Client and from now on the
old is called the Classic client.
Also introduced with NAV 2009 is the new form object called Pages and the
new RoleTailored reports that you must design using the Visual Studio
Report Designer.
2009 - Dynamics NAV 2009 Service pack 1 was released on September 1st.
Microsoft Dynamics NAV 2009 introduces a service tier and the ability to expose
Codeunits and Pages as web services. The web services can be used by
applications such as InfoPath or Excel to call Navision business logic via codeunits
or read and update data through Page objects.
Microsoft Dynamics NAV 2009 supports exposing pages and codeunits as Web
services. Pages and codeunits can also be combined to offer even more
functionality on the page Web service.
of subtype Item). The codeunit must also have the same name as that which you
have provided for the Page web service (for example if your Item Card page is
called Items on the Web Services table, your codeunit must also be called
Items). Finally the codeunit should not be ticked as published. When you are
handling the the function call inside the codeunit, the first parameter represents
the record that the function should operate on.
Codeunit Web services provide the developer with the most control and flexibility
around the behavior of the Web service.
When a codeunit is exposed as a Web service, no default set of methods is
exposed to developers. The methods that should be available on a codeunit are
decided by the developer of the codeunit.
Concurrency is not managed automatically when a codeunit is exposed as a Web
service, each codeunit call is managed as a single transaction.
If you know NAV version 6.0(2009) and above can work even in three tier
environment.
In Three tier environment we have client component called as Role Tailored Client,
the Reports having RDLC layout works from Role Tailored Client.
SumIndex is a Indexing feature, to enable fast calculations, and the fields are not
ment to be accessed, unlike the FlowFields.
FlowFields are virtual fields in the Table. It is not a permanent part of the table
data. It is used to calculate values from another or same table based on
CalcFormula specified for the field. The information in the FlowFields exists only at
run time.
To update a FlowField you can you CALCFIELDS function as:
record.CALCFIELDS("FieldName")
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
When you set this property to Yes on a codeunit, all codeunit variables that use this
codeunit use the same instance. That is, all codeunit variables of this codeunit use
the same set of internal variables when the code is running on the same client. The
codeunit remains instantiated until you close the company.
A dimension is data that you can add to an entry as a kind of marker so that the
program can group entries with similar characteristics and easily retrieve these
groups for analysis purposes. Dimensions can be used throughout the program on
entries in journals and documents, as well as budgets. The term dimension is used
in Navision to describe how analysis occurs. A two-dimensional analysis, for
example, would be sales per area. However, by using more than two dimensions
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
when creating an entry, you can carry out a more complex analysis at a later
time, for example, sales per sales campaign per customer group per area.
Each dimension can have an unlimited series of dimension values that are sub-
units of that dimension. For example, a dimension called Department can have
departments called Sales, Administration and so on as subunits. These
departments are dimension values. Dimensions and dimension values are user-
defined and unlimited, which means you can create dimensions tailored to your
company's needs and business processes. However, some dimensions, such as
account number and date, are already defined for you by the program.
Autosplitkey
Autosplitkeys is a form property that automatically generates key values for
primary keys that end with an integer type field. An example is on the sales order
subform. This form is linked to the header table by the document type and
document number, and the autosplitkey generates the line number automatically.
The reason why they selected the number 10000 is because that way you can
insert lines between two existing lines. So if you have line 10000 and line 20000,
the autosplitkey will automatically generate line number 15000 when you insert a
line between those lines.
Autosplitkey:
Sets whether a key is automatically created for a new record placed between the
current record and the previous record.
Skip:
Quit:
Basically SETFILTER is the Navision function that internally ... sets filters
[Duh!] where as SETRANGE is a function that does multiple things, and is
bassically a parser to the Navison setfilter function.
With Set filter you can do anything you want, but you have to set the
paramaters carefully. SETRANGE just allows you to do short cuts.
SETRANGE is a convenience for the programmer. It maps the parameters
internally to the correct filter expression and calls a filter function - the same
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
BLOB
A binary large object (BLOB) is a complex data type. Variables of this data type
differ from normal numeric and string variables in that BLOBs have a variable
length.
The maximum size of a BLOB is normally determined by your system's disk storage
capacity. However, the maximum size in C/SIDE is 2 GB.
Transheader ? Transfooter?
Transheader should be printed before the first line of its dataitem on every page
but the first.
Transfooter should be printed after the last line of the dataitem on every page but
the last.
When the report runtime routine is about to print a BODY section, it checks to see if
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
there is enough room left on the page to print not only the BODY section, but also
the remaining BODY sections from the same DataItem (assuming that
KeepWithNext property is set to Yes), the TransFooter sections for that DataItem,
and any Footers that are set to print at the bottom of the page. If there is enough
room for all of this, it prints the BODY section. If not, it prints the TransFooter and
Footer sections, ejects the page, and prints the Header (assuming they are set to
print on every page) and TransHeader sections at the top of the next page, and
lastly prints the BODY section.
Example - you have an annual report that needs to be generated. This report
works across multiple reports and multiple tables and analyzes a lot of data. As this
process only needs to be run once per year why have users have the performance
hit of updating and maintaining those keys all year round. Turn the keys on, run
the year end reporting and then turn them off.
In reality when you enable the keys the database needs to generate those indexes
and that takes time, during which the system may perform poorly. It also assumes
that those keys are only really needed on a periodic basis (i.e. once a year). In the
field I typically see that once a table has a key on it...developers, analysts, report
writers see it and start to use it in reports, forms, processes that are run all the
time, which means they can't be turned off.
When you have a look in the design of a table and open the list of Keys of that table
you will notice that every Key has a KeyGroup property. You can see this property
to specify the predefined key groups that a key belongs to. After you have assigned
a key to one or more key groups, you can selectively activate or deactivate the key
by enabling and disabling the key groups. In the past this was only possible by
going into the Database Key Groups window.
To enable or disable a key group for sorting, click File, Database, Information and
the Database Information window appears:
With key groups, it was possible for the user to manually activate a key before a
run. So for reports, codeunits, etc. which is seldom executed, you would activate
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
the needed key group before execution start. This was though not always an
optimal solution, because the key group could not be activated from code (C/AL),
and therefore the user often did forget to enable it before the big runs.
KEYGROUPENABLE
KEYGROUPDISABLE
KEYGROUPENABLED
KEYGROUPENABLE can be used for enabling a key group through code, and thereby
you can enable a needed key.
So where do we find key groups? Key groups are defined in the table view (File ->
Database -> Information -> Tables, Button Key Groups). Here you can add a new
group, delete groups and enable/disable them.
To add a specific key to a key group, go into the table design and view the keys.
Here you can add the Key Group. If you can not see the field, then it is simple a
hidden column.
Sets a value that specifies whether a must user leaves a record before it is inserted
into the database. By default, new records are inserted when the user leaves the
control that shows the primary key in the table.
Forms
Pages
Property Value
Yes if the record is inserted when the user leaves the record; otherwise, No if the
record is inserted when the user leaves the control that shows the primary key. The
default value is No.
"the program should not insert the record until the user has left the record."
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
I am making a form. So i guess it is in the form properties but not sure what
property to change..
Is it
Insert Allowed?
Delayed Insert?
UpdateOnActivate?
Determines which field caused a group total to be calculated. This determines which
field changed contents and thereby concluded a group.
This function can only be used in group header and group footer sections. It is
useful when you have defined several levels of grouping and need to know which of
the groups has changed and caused a group total to be calculated.
This function is not supported on client report definition (RDLC) report layouts.
TotalFields vs CurrReport.CreateTotal
Just like the TotalFields property, CREATETOTALS causes group and grand totals to
be maintained. The totals can be printed by placing controls that have the variable
or variables that are the arguments of CREATETOTALS as their source expressions
in the appropriate sections: the group totals are printed in GroupFooter sections,
and the grand totals are printed in Footer sections.
1) Open the Properties window (SHIFT + F4) of the data item that you want to
group.
2) Enter the name of the field that you want to group by at the GroupTotalFields
property.
3) Select a key for the DataItemTableView property. You must select a key that
contains the field that you want to group by. Otherwise, the grouping won't work.
4) Enter the names of the fields that you want Navision to calculate based on the
grouping. The calculated value can be shown in the Group Footer section.
5) Close the Properties window and open the Layout view.
6) Press F3 to insert a Group Header section.
7) Press F3 to insert a Group Footer section.
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
For Eg:
In the following example, the SETRANGE function sets a filter and then the
CALCFIELDS function calculates the Balance and Balance Due fields by using the
current filter and performing the calculations that are defined as the CalcFormula
properties of the FlowFields.
CALCSUMS Function
CALCSUMS calculates the sum of one or more fields that are SumIndexFields in the
record.
CALCSUMS has the following syntax.
For CALCSUMS, a key that contains the SumIndexFields must be selected as the
current key. Similar to CALCFIELDS, CALCSUMS uses the current filter settings
when performing the calculation.
For Eg:
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
System-Defined Variables
C/SIDE automatically declares and initializes a number of variables that you can
use when you develop applications. The following details describes the system-
defined variables.
Rec
When a record is modified, this variable specifies the current record, including the
changes that are made.
xRec
When a record is modified, this variable specifies the original values of the record,
before the changes.
CurrForm
This variable specifies the current form. You can access the controls of the form
through this variable and set the dynamic properties of the form and its controls.
CurrReport
This variable specifies the current report.
RequestOptionsForm
This variable specifies the request options form for the current report.
CurrFieldNo
This variable specifies the field number of the current field in the current form.
Retained for compatibility reasons.
. FIND
. NEXT
These functions are some of the most commonly used C/AL functions. When you
search for records, it is important to know the difference between GET and FIND
and to know how to use FIND and NEXT in conjunction.
GET Function
GET retrieves one record based on values of the primary key fields.
For example, if the No. field is the primary key of the Customer table and if you
have created a Record variable called CustomerRec that has a Subtype of
Customer, then you can use GET in the following way:
CustomerRec.GET('4711');
GET produces a runtime error if it fails and the return value is not checked by the
code. In the preceding example, the actual code that you write should be similar
to the following.
IF CustomerRec.GET('4711') THEN
.... // Do some processing.
ELSE
.... // Do some error processing.
GET searches for the records, regardless of the current filters, and it does not
change any filters. GET always searches through all the records in a table.
FIND Function
FIND locates a record in a C/SIDE table based on the values stored in the keys.
The important differences between GET and FIND are the following:
FIND can be instructed to look for records where the key value is equal to, greater
than, or smaller than the search string.
FIND can find the first or the last record, depending on the sort order defined by
the current key.
When you are developing applications in a relational database, there are often
one-to-many relationships defined between tables. An example could be the
relationship between an Item table, which registers items, and a Sales Line table,
which registers the detailed lines from sales orders. One record in the Sales Line
table can only be related to one item, but each item can be related to any number
of sales line records. You would not want an item record to be deleted as long as
there are still open sales orders that include the item. You can use FIND to check
for open sales orders.
The OnDelete trigger of the Item table includes the following code that illustrates
using FIND.
SalesOrderLine.SETCURRENTKEY(Type,"No.");
SalesOrderLine.SETRANGE(Type,SalesOrderLine.Type::Item);
SalesOrderLine.SETRANGE("No.","No.");
IF SalesOrderLine.FIND('-') THEN
ERROR(Text001,TABLECAPTION,"No.",SalesOrderLine."Document Type");
NEXT Function
NEXT is often used with FIND to step through the records of a table.
In the following example, FIND is used to go to the first record of the table. NEXT
is used to step through every record, until there are no more. When there are no
more records, NEXT returns 0 (zero).
FIND('-');
REPEAT
// process record
UNTIL NEXT = 0;
IF THEN [ELSE]
C/AL:
1. IF THEN [ELSE], where there are two choices
2. CASE, where there are more than two choices.
IF THEN ELSE Statements
IF THEN ELSE statements have the following syntax.
IF (Condition) THEN (Statement1)
[
ELSE
(Statement2)
]
This means that if (Condition) is true, then (Statement1) is executed. If (Condition)
is false, then (Statement2) is executed.
The square brackets around ELSE mean that this part of the statement is optional.
The ELSE statement is used when different actions are executed, depending on the
evaluation of (Condition).
You can build even more complex control structures by nesting IF THEN ELSE
statements. The following example is a typical IF THEN ELSE statement.
IF (Condition1) THEN
IF (Condition2) THEN
Statement1;
ELSE
Statement2
Note: A semicolon preceding an ELSE is not allowed.
If 'Condition1' is false, then nothing is executed. If 'Condition1' and 'Condition2' are
both true, then 'Statement1' is executed. If 'Condition1' is true and 'Condition2' is
false, then 'Statement2' is executed.
Reading several nested IF THEN ELSE statements can be quite confusing but a
general rule is that an ELSE belongs to the last IF that lacks an ELSE.
Example 1
The following example shows an IF statement without the optional ELSE part.
IF Amount (<) 1000 THEN Total := Total + Amount;
Example 2
The following example shows an IF statement with the optional ELSE part.
(1)...
(2) IF Amount (<1000) align="justify">(3) THEN BEGIN
(4) IF I > J THEN Max := I
(5) ELSE Max := J;
(6) Amount := Amount * Max;
(6) END
(7) ELSE
(8)...
A common error is to put an extraneous semicolon at the end of a line before an
ELSE (line 4). As mentioned earlier, this is not valid according to the syntax of
C/AL. The semicolon is used as a statement separator. (The end of line 4 is inside
the inner IF statement.)
CASE Statements
CASE statements have the following syntax.
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
CASE (Expression) OF
(Value set 1) : (Statement 1);
(Value set 2) :(Statement 2);......
(Value set n) : (Statement n);
[ ELSE (Statement n+1) ]
CASE statements are also called multiple option statements and are typically used
when you must choose between more than two different actions.
The function of the CASE statement is as follows:
1. The 'Expression' is evaluated, and the first matching value set executes the
associated statement, if there is one.
2. If none of the value sets matches the value of the expression, and the optional
ELSE part has been omitted, no action is taken. If the optional ELSE part is used,
then the associated statement is executed.
The data type of the value sets must be the same as the data type of 'Expression'
or at least be convertible to the same data type.
For Eg:
The following C/AL code prints various messages depending on the value of
Number. If the value of Number does not match any of the entries in the CASE
structure, the ELSE entry is used as the default.
CASE Number OF
1,2,9: MESSAGE('1, 2, or 9.');
10..100: MESSAGE('In the range from 10 to 100.');
ELSE MESSAGE('Neither 1, 2, 9, nor in the range from 10 to 100.');
END
FOR,WHILE,REPEAT
C/AL Repetitive Statements
A repetitive statement is also known as a loop. The Different Loop statements are
Given below.
1. FOR
2. WHILE
3. REPEAT
FOR
Repeats the inner statement until a counter variable equals the maximum or
minimum value specified.
The Two Control Structures In FOR Statement are FOR TO and FOR DOWNTO.
The Syntax For The above control structures are given below.
FOR [Control Variable] := [Start Number] TO [End Number] DO
[Statement]
The data type of [Control Variable], [Start Number], and [End Number] must be
Boolean, number, time, or date.
Use FOR statements when you want to execute code a specific number of times.
Use a control variable to control the number of times the code is executed. The
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
IF Rec.FIND('-') THEN
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
REPEAT
UNTIL Rec.NEXT = 0;
Rec.LOCKTABLE(TRUE,TRUE);
IF Rec.FIND('-') THEN
REPEAT
Rec.MODIFY;
UNTIL Rec.NEXT = 0;
SQL Server
Example 2
Rec.LOCKTABLE;
IF Rec.FIND('-') THEN
REPEAT
UNTIL Rec.NEXT = 0;
IF Rec.FIND('-') THEN
REPEAT
Rec.MODIFY;
UNTIL Rec.NEXT = 0;
The different tiers can be installed on different computers. You can have multiple
instances of any of the components (though usually not on the same computer):
multiple clients, multiple servers, and multiple database servers.
Sets a value that indicates whether the table data applies to all companies in the
database or only the current company.
When you set the property "DataPerCompany" to FALSE, the data will be "Common
to All Companies".
When you restore a backup into a DB with existing data, it is not possible to check
"Data Common to All Companies".
In no particular order:
Run Planning
Action Suggestions
Load PO's
Process PO's
Process TO's
Process PI
Manufacture
Book into Stock
Manage Inventory
Load Sales Order
Pick SO
Ship SO
Invoice SO
Pay Supplier
Process Customer Payment
Diff b/w OnAfterGetRecord and OnAfterGetCurrentRecord
Flow field :-
It is a powerful feature of C/side database system.
Underlying concept of SIFT that increase performance.
Flow field data does not gets stored in the data base.
Types of forms:
Card Form
Tabular Form or List Form
Statistics Form
Worksheet From
Line/Header From
Matrix Form
Dialog Form
Request Form
Setup From
Dimensions are used for filter the data.
OnValidate()
OnRename()
OnModify()
OnInsert()
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
OnModifyRecord()
Form-OnInit()
OnOpenForm
OnCloseForm()
OnQuaryCloseForm()
OnActivateForm()
OnDeactiveForm()
OnFindRecord()
OnNextRecord()
OnAfterGetRecord()
OnAfterGetCurrRecord()
OnBeforePutRecord()
OnInsertRecord()
OnModifyRecord()
OnDeleteRecord()
OnTimer
OnCreateHyperlink
OnHyperlink
OnDeactivate()
OnFormat()
OnBeforeInput()
OnInputChange()
OnAfterInput()
OnValidate()
OnAfterValidate()
OnLookUp()
OnDrillDown()
OnAssitEdit()
OnPrereport()
OnPostreport()
OnCreateHyperlink()
OnHyperlink()
OnAftergetrecord()
Onpostdataitem()
Autosplitkey property()
- It is mechanism in Navision to generate a number between a previous
and next record.
-2 Tier Architecture
Master
Contains information about the primary focus subject of its functional area.
Customer, Vendor, Item.
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
Supplemental
Stores information about a supplemental subject used in one or more
functional areas.
Department, Language, Currency.
Setup
Stores one record that holds general information about its functional area.
G/L Setup, Sales & Receivables Setup.
Register
A "table of contents" for its corresponding Ledger table or tables.
G/L Register, Item Register.
Subsidiary
Contains information which is subsidiary to either a Master table or a
Supplemental table or both.
Item Vendor, FA Depreciation Book.
Ledger
Contains the transactional information that is the primary focus of its
functional area.
Cust. Ledger Entry, Item Ledger Entry.
Journal
The primary transaction entry table for a functional area.
Purchase Journal, Item Journal.
Document
Secondary transactional tables that allow entries in a functional area or into
multiple functional areas at once. This is actually implemented as a pair table.
Sales Header / Sales Line, Finance Charge Memo Header / Finance Charge
Memo Line, Reminder Header / Reminder Line.
Document History
Contains the transaction history for documents that have been posted.
Sales Invoice Header / Sales Invoice Line, Issued Fin. Charge Memo Header /
Issued Fin. Charge Memo Line, Issued Reminder Header / Issued Reminder Line.
A Master table contains information about the primary focus subject of its functional
area.
Other tables are related to a Master table and the Master table is related to other
supplemental tables. (Many-to-Many relationship).
Functional areas have 1 Master table. There are cases where there are two Master
tables for a functional area.
Associated Forms
3 forms are used with Master table:
Card form
List form
Statistics form.
Used to view calculated information about the record in the Master table. Put on a
separate form for performance reasons.
Name of this form is: Name + 'Statistics'.
Associated Forms
Name of this form is plural of the name of the supplemental table.
This form/s has no extra buttons besides the standard.
This form is set as the LookupFormID property of the table since it is used for
lookups and edits.
Associated Forms
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
If primary key for the subsidiary table contains an integer, the form is a worksheet
form which does not contain any primary key fields.
The primary key fields other than the integers are filtered so that they are viewed
and set automatically.
If primary key for subsidiary table does not contain integer, form is a tabular form
and it does not contain primary key field of master table.
This field is filtered so that it viewed and set automatically.
The form is linked back to form that called it up so that so if record is modified,
filters are also changed.
This ensures that correct related records are always in view.
Name of Ledger table is name of Master table to which it is related plus "Ledger
Entry".
When there is more than one Master table, the name is the functional area followed
by "Ledger Entry".
Field in Ledger table has a relation to Master table associated with this Ledger
table.
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
Ledger tables have numerous secondary keys. Some of these secondary keys are
sumindex fields.
These are used with FlowFields on the Master table to calculate info for the user.
At least one of the Secondary Keys have the field that is related to the Master table
as the first field in the key.
Associated Forms
Ledger table uses List form to display info.
Form is named with plural of Ledger table.
One record per posting process and Register table corresponds closely to posting
routine rather than functional area.
Other fields include two fields of type Integer related to corresponding Ledger table
called "From Entry No." and "To Entry No.".
Associated forms
Register table uses List form to display info. to the user.
Form has same name as Register table.
It contains a Menu button "Register" which contains links to other List forms
displaying corresponding Ledger table/s.
All transactions pass through this table to eventually be posted to Ledger table.
Journal tables are related to other tables including Master table, Supplemental
tables, Subsidiary tables, and Corresponding Ledger table.
Journal tables have more trigger code than other table types.
Names of these two tables are same as name of Journal Table followed by "Journal
Batch" or "Journal Template".
The two corresponding tables for Resource Journal Line are "Resource Journal
Template" and "Resource Journal Batch".
Associated forms
Form used for Journal table is a worksheet form which is used to make entries to
the table.
When called, it is filtered by Template and Batch fields, and AutoSplitKey property
of worksheet automatically sets Line No. field.
Worksheet form includes a menu button that has same name as Master table.
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
Call up card form for Master table is triggered by pressing SHIFT + F5.
Call up Ledger for current Master record triggered by pressing CTRL + F5.
Worksheet form includes menu button named posting, which lets user print test
report, post, post and print a register and include choice to reconcile.
Worksheet form includes other buttons that lets user perform various processing
functions.
Document tables are related to other tables, but other tables are not related to a
document table.
For Document Header, PK is a code field of length 20 containing Document No. and
name "No.".
Document Header tables contain multiple types of documents referring to same
transaction.
For Document Line tables, PK has two fields - Code field of length 20 containing
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
Associated Forms
Document Header table uses card form to display one header record at a time for
user to view and edit info.
Document Header includes menu button named "Posting", which lets user print test
reports, post, post and print document, or post a batch of these documents.
Form also includes other buttons that lets user perform various processing
functions.
Difference between Document Header and Card Form is that Document Header
contains a sub-form control, which contains Document Lines form.
A Document Line uses a worksheet form to display multiple line records at a time
for the user to view, and let user edit one at a time.
None of PK fields should be included on this form as form is filtered for all of PK
fields except for Integer field, which is handled by AutoSplitKey property of
worksheet.
Document Header uses List Form to let user view multiple documents at the same
time.
Document History Table has same fields with same field numbers, names and
properties as original document tables.
Since document history tables record posted transactions, they are not editable by
user, although they may be deleted.
Document History Tables and forms are the same as corresponding document
tables.
No tables are related to setup table, although setup table can be related to other
tables.
Types of Forms
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
Let us briefly review types of forms that we will use in an application. Then we will
step to several examples using our C/ANDL system to illuminate our path. From an
application design point of view, we need to consider which form type to use under
what circumstances. The following are the different form types:
Card form: These display and allow updating of a single record. A Card form
is generally used for Mastertable and Setup data. Complex cards can contain
a number of tabs, and may even display data from subordinate tables.
Tabular or List form: These display a list of any number of records at one
time, one line per record, with each displayed data field shown as a column.
The Reference table maintenance and inquiry use Tabular forms. List forms
use the same format as Tabular forms but (usually) are not editable. They
can be used, for example, to show a list of master records to allow the user
to compare records or to easily choose one master record on which to focus.
Some specific List forms, such as Ledger Entries, allow editing of some fields
(such as Invoice Due Dates).
Tabular/List forms are widely used as transaction entry forms. One of NAVs
design features is to allow volume data entry activities to be done with little
or no mouse usage. This provides higher data entry speed in situations
where volume entry is feasible.
You can create a version of Tabular forms that is particularly suitable for high
volume data entry into transaction journals. In the NAV documentation these
are referred to as Worksheet Forms. Worksheet forms use
the AutoSplitKey property combined with an integer field as the last field in
the tables primary key. This results in the entered data being automatically
sequenced as it is entered. The C/AL code must handle the incrementing of
the integer field as new records are appended.
The AutoSplitKey property will handle the creation of a new integer for a
record being inserted between two other existing records. It does so by
splitting the number range between the two original records to assign an
integer value to the new, inserted record. For example, if the original records
had keys ending in the values 50000 and 60000, then AutoSplitKey will
assign the value 55000 to the new inserted record key.
A simple tabular form may show all the fields in a reference table to allow
entering data or choosing one entry from among the available set. A complex
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
tabular or list form might show data from several tables and some computed
fields.
Header/Detail forms are used in Sales and Purchasing functions for Quotes,
Orders, and Invoices, both before and after Posting. Header/Detail forms are
also used in other areas such as Manufacturing Work Orders, Production Bills
of Material, and Production Routings.
Matrix form: This form type display results based on the intersections of
two tables, called the source table and the matrix source table. The display is
in a spreadsheet-style matrix format. The displayed data element of the
source table is the leftmost column. The matrix source table principle data
element is displayed across the top row, in the column header row position,
with the results of the cell source data expression filling out the body of the
matrix.
The actual data displayed for each matrix cell may be computed from the
intersection of these two tables. For it could be from some other table, but
selected based on the results of the intersection of these two tables, for
example, where values from the intersects are used in an algorithm with or
to filter values in other tables.
Trendscape forms may use different form types for the display of date-
filtered data, and several variations occur in the standard NAV system. In
Form 490, the Acc. Schedule Overview, the Trendscape date filter applies to
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
all data appearing on the screen and the form is a Matrix form supplemented
with a Tab control.
Designer | Form. Obviously, the data displayed must be time related (e.g.
generally tied to a Posting Date).
Variables
PrintToExcel Boolean
-----------------------------------------------------------
Functions
Name
MakeExcelInfo
CreateExcelbook
MakeExcelDataHeader
MakeExcelDataBody
-----------------------------------------------------------
MakeExcelInfo()
RecExcelBuffr.SetUseInfoSheed;
RecExcelBuffr.AddInfoColumn('Company Name',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddInfoColumn(COMPANYNAME,FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.NewRow;
RecExcelBuffr.AddInfoColumn('Report Name',FALSE,'',TRUE,FALSE,FALSE,'');
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
RecExcelBuffr.AddInfoColumn('VAT Exceptions',FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.NewRow;
RecExcelBuffr.AddInfoColumn('Report No.',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddInfoColumn('31',FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.NewRow;
RecExcelBuffr.AddInfoColumn('User ID',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddInfoColumn(USERID,FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.NewRow;
RecExcelBuffr.AddInfoColumn('Date',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddInfoColumn(TODAY,FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.ClearNewRow;
-----------------------------------------------------------
CreateExcelbook()
RecExcelBuffr.CreateBook;
RecExcelBuffr.CreateSheet('Data','VAT Exceptions',COMPANYNAME,USERID);
RecExcelBuffr.GiveUserControl;
ERROR('');
-----------------------------------------------------------
MakeExcelDataHeader()
RecExcelBuffr.NewRow;
RecExcelBuffr.AddColumn('Posting Date',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn('Document Type',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn('Document No.',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn('Type',FALSE,'',TRUE,FALSE,FALSE,'');
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
RecExcelBuffr.AddColumn('Base',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn('Amount',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn('VAT Difference',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn('Bill-to/Pay-to No.',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn('Closed',FALSE,'',TRUE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn('Entry No.',FALSE,'',TRUE,FALSE,FALSE,'');
//RecExcelBuffr.AddColumn(Value,IsFormula,CommentText,IsBold,IsItalics,IsUnderl
ine,NumFormat)
-----------------------------------------------------------
MakeExcelDataBody()
RecExcelBuffr.NewRow;
RecExcelBuffr.AddColumn(FORMAT("VAT Entry"."Posting
Date"),FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn(FORMAT("VAT Entry"."Document
Type"),FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn("VAT Entry"."Document
No.",FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn(FORMAT("VAT
Entry".Type),FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn("VAT Entry".Base,FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn("VAT Entry".Amount,FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn("VAT Entry"."VAT
Difference",FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn("VAT Entry"."Bill-to/Pay-to
No.",FALSE,'',FALSE,FALSE,FALSE,'');
RecExcelBuffr.AddColumn(FORMAT("VAT
Entry".Closed),FALSE,'',FALSE,FALSE,FALSE,'');
-----------------------------------------------------------
-----------------------------------------------------------
-----------------------------------------------------------
Report - OnPreReport()
IF PrintToExcel THEN
MakeExcelInfo;
-----------------------------------------------------------
Report - OnPostReport()
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
IF PrintToExcel THEN
CreateExcelbook;
-----------------------------------------------------------
FIND
FINDSET: for getting multiple records, you intend to loop through them
FINDFIRST: for getting only the first record in the filter, just one record
FINDLAST: for getting only the last record in the filter, just one record
Specifies how to perform the search. The table is searched until either a record is
found or there are no more records. Each character in this string can be present
only once. You can combine the '=', '<', and '>' characters. You can use the
following characters:
> to search for a record that is larger than the key values
< to search for a record that is less than the key values
+ to search for the last record in the table (+ can only be used alone)
- tosearch for the first record in the table (- can only be used alone)
If this parameter contains '=', '>' or '<', then you must assign value to all fields of
the current and primary keys before you call FIND.
FIND ('=') is more similar to GET function: the difference between those 2 is that
GET ignores any filter applied to the set
Ex:
IF Amount < 0 THEN
CurrForm.Amount.UPDATEFORECOLOR(255);
ForeColor Codes
3268 - light magenta
32768 - green
255 - red
16711680 - dark blue
116687698 - light blue
165458 - light gren
5458 - brown
534458 - shade of red
90000 - light brown
50000825 - very light blue
50000890 - whitish blue
60000826 - peacock blue
963258741 - violet
963258 - greenish yellow
987654321 - purple
XMLports
XMLports was introduced with Navision 4.0 they act like dataports, with a small
difference. They can only be used for XML-formatted data and they must by
executed from some other routine.
What is NAS
NAS is a client without a user interface (GUI), running as a service. Thats all it is.
When it starts, it will run a function in codeunit 1, passing on the Start-up
parameter that has been set up. Thats all it does. There are two prerequisites for
this function in codeunit 1:
It must have ID 99 (the name of the function is irrelevant)
It must have one parameter Text 250. The name of this parameter is also
irrelevant.
Sriram Maringanti ERP-Executive
sriram.msdnav@gmail.com
NAS on its own does not do anything else. So on its own it is a very simple
component. But the application you build around it can, off course, be as
complicated as any other application.