Table field changes between Nav 2013 and Nav 2016

In addition to last postings about table changes you’ll find here the field changes.

New table fields in Nav 2016:

Table No.Table NameField No.Field Name
9Country/Region10VAT Scheme
15G/L Account70Omit Default Descr. in Jnl.
15G/L Account1700Default Deferral Template Code
18Customer11Document Sending Profile
18Customer288Preferred Bank Account
21Cust. Ledger Entry172Payment Method Code
21Cust. Ledger Entry173Applies-to Ext. Doc. No.
21Cust. Ledger Entry290Exported to Payment File
23Vendor132Partner Type
23Vendor170Creditor No.
23Vendor288Preferred Bank Account
25Vendor Ledger Entry170Creditor No.
25Vendor Ledger Entry171Payment Reference
25Vendor Ledger Entry172Payment Method Code
25Vendor Ledger Entry173Applies-to Ext. Doc. No.
25Vendor Ledger Entry288Recipient Bank Account
25Vendor Ledger Entry289Message to Recipient
25Vendor Ledger Entry290Exported to Payment File
27Item120Stockout Warning
27Item121Prevent Negative Inventory
27Item1700Default Deferral Template Code
27Item7385Next Counting Start Date
27Item7386Next Counting End Date
36Sales Header56Recalculate Invoice Disc.
36Sales Header165Incoming Document Entry No.
36Sales Header1200Direct Debit Mandate ID
36Sales Header1305Invoice Discount Amount
37Sales Line56Recalculate Invoice Disc.
37Sales Line84Tax Category
37Sales Line1300Posting Date
37Sales Line1700Deferral Code
37Sales Line1702Returns Deferral Start Date
38Purchase Header56Recalculate Invoice Disc.
38Purchase Header165Incoming Document Entry No.
38Purchase Header170Creditor No.
38Purchase Header171Payment Reference
38Purchase Header1305Invoice Discount Amount
38Purchase Header9001Pending Approvals
39Purchase Line56Recalculate Invoice Disc.
39Purchase Line1700Deferral Code
39Purchase Line1702Returns Deferral Start Date
39Purchase Line5005396Order No.
39Purchase Line5005397Order Line No.
49Invoice Post. Buffer1700Deferral Code
49Invoice Post. Buffer1701Deferral Line No.
79Company Information50Allow Blank Payment Info.
79Company Information90GLN
81Gen. Journal Line165Incoming Document Entry No.
81Gen. Journal Line170Creditor No.
81Gen. Journal Line171Payment Reference
81Gen. Journal Line172Payment Method Code
81Gen. Journal Line1220Data Exch. Entry No.
81Gen. Journal Line1221Payer Information
81Gen. Journal Line1222Transaction Information
81Gen. Journal Line1223Data Exch. Line No.
81Gen. Journal Line1224Applied Automatically
81Gen. Journal Line1700Deferral Code
81Gen. Journal Line1701Deferral Line No.
81Gen. Journal Line5618Comment
85Acc. Schedule Line30Double Underline
91User Setup21Approval Administrator
96G/L Budget Entry16Last Date Modified
98General Ledger Setup160Payroll Trans. Import Format
98General Ledger Setup161VAT Reg. No. Validation URL
112Sales Invoice Header710Document Exchange Identifier
112Sales Invoice Header711Document Exchange Status
112Sales Invoice Header712Doc. Exch. Original Identifier
112Sales Invoice Header720Coupled to CRM
112Sales Invoice Header1200Direct Debit Mandate ID
112Sales Invoice Header1300Canceled By
112Sales Invoice Header1301Canceled
112Sales Invoice Header1302Paid
112Sales Invoice Header1303Remaining Amount
112Sales Invoice Header1304Cust. Ledger Entry No.
112Sales Invoice Header1305Invoice Discount Amount
113Sales Invoice Line84Tax Category
113Sales Invoice Line1700Deferral Code
114Sales Cr.Memo Header710Document Exchange Identifier
114Sales Cr.Memo Header711Document Exchange Status
114Sales Cr.Memo Header712Doc. Exch. Original Identifier
114Sales Cr.Memo Header1300Canceled
114Sales Cr.Memo Header1302Paid
114Sales Cr.Memo Header1303Remaining Amount
114Sales Cr.Memo Header1304Cust. Ledger Entry No.
114Sales Cr.Memo Header1305Invoice Discount Amount
115Sales Cr.Memo Line84Tax Category
115Sales Cr.Memo Line1700Deferral Code
122Purch. Inv. Header170Creditor No.
122Purch. Inv. Header171Payment Reference
122Purch. Inv. Header1300Canceled By
122Purch. Inv. Header1301Canceled
122Purch. Inv. Header1302Paid
122Purch. Inv. Header1303Remaining Amount
122Purch. Inv. Header1304Vendor Ledger Entry No.
122Purch. Inv. Header1305Invoice Discount Amount
123Purch. Inv. Line1700Deferral Code
124Purch. Cr. Memo Hdr.1300Canceled
124Purch. Cr. Memo Hdr.1302Paid
124Purch. Cr. Memo Hdr.1303Remaining Amount
124Purch. Cr. Memo Hdr.1304Vendor Ledger Entry No.
124Purch. Cr. Memo Hdr.1305Invoice Discount Amount
125Purch. Cr. Memo Line1700Deferral Code
156Resource1700Default Deferral Template Code
172Standard Customer Sales Code4Valid From Date
172Standard Customer Sales Code5Valid To date
172Standard Customer Sales Code6Payment Method Code
172Standard Customer Sales Code7Payment Terms Code
172Standard Customer Sales Code8Direct Debit Mandate ID
172Standard Customer Sales Code9Blocked
204Unit of Measure3International Standard Code
232Gen. Journal Batch11Allow Payment Export
232Gen. Journal Batch12Bank Statement Import Format
242Source Code Setup49Payment Reconciliation Journal
246Requisition Line7100Blanket Purch. Order Exists
270Bank Account42Last Payment Statement No.
270Bank Account62Total on Checks
270Bank Account113Bank Statement Import Format
270Bank Account116Direct Debit Msg. Nos.
270Bank Account117SEPA Direct Debit Exp. Format
270Bank Account1210Payment Export Format
270Bank Account1211Bank Clearing Code
270Bank Account1212Bank Clearing Standard
270Bank Account1213Bank Name – Data Conversion
270Bank Account1250Match Tolerance Type
270Bank Account1251Match Tolerance Value
270Bank Account1260Positive Pay Export Code
271Bank Account Ledger Entry70Check Ledger Entries
272Check Ledger Entry23Data Exch. Entry No.
272Check Ledger Entry24Data Exch. Voided Entry No.
272Check Ledger Entry25Positive Pay Exported
272Check Ledger Entry26Record ID to Print
273Bank Acc. Reconciliation6Bank Statement
273Bank Acc. Reconciliation7Total Balance on Bank Account
273Bank Acc. Reconciliation8Total Applied Amount
273Bank Acc. Reconciliation9Total Transaction Amount
273Bank Acc. Reconciliation20Statement Type
273Bank Acc. Reconciliation21Shortcut Dimension 1 Code
273Bank Acc. Reconciliation22Shortcut Dimension 2 Code
273Bank Acc. Reconciliation480Dimension Set ID
274Bank Acc. Reconciliation Line15Related-Party Name
274Bank Acc. Reconciliation Line16Additional Transaction Info
274Bank Acc. Reconciliation Line17Data Exch. Entry No.
274Bank Acc. Reconciliation Line18Data Exch. Line No.
274Bank Acc. Reconciliation Line20Statement Type
274Bank Acc. Reconciliation Line21Account Type
274Bank Acc. Reconciliation Line22Account No.
274Bank Acc. Reconciliation Line23Transaction Text
274Bank Acc. Reconciliation Line24Related-Party Bank Acc. No.
274Bank Acc. Reconciliation Line25Related-Party Address
274Bank Acc. Reconciliation Line26Related-Party City
274Bank Acc. Reconciliation Line31Shortcut Dimension 1 Code
274Bank Acc. Reconciliation Line32Shortcut Dimension 2 Code
274Bank Acc. Reconciliation Line50Match Confidence
274Bank Acc. Reconciliation Line51Match Quality
274Bank Acc. Reconciliation Line60Sorting Order
274Bank Acc. Reconciliation Line480Dimension Set ID
279Extended Text Header8Description
287Customer Bank Account1211Bank Clearing Code
287Customer Bank Account1212Bank Clearing Standard
288Vendor Bank Account1211Bank Clearing Code
288Vendor Bank Account1212Bank Clearing Standard
289Payment Method6Direct Debit
289Payment Method7Direct Debit Pmt. Terms Code
289Payment Method8Pmt. Export Line Definition
289Payment Method9Bank Data Conversion Pmt. Type
290VAT Amount Line19Tax Category
311Sales & Receivables Setup44VAT Bus. Posting Gr. (Price)
312Purchases & Payables Setup1217Debit Acc. for Non-Item Lines
312Purchases & Payables Setup1218Credit Acc. for Non-Item Lines
313Inventory Setup40Prevent Negative Inventory
325VAT Posting Setup17Tax Category
370Excel Buffer16Double Underline
372Payment Buffer170Creditor No.
372Payment Buffer171Payment Reference
372Payment Buffer172Payment Method Code
372Payment Buffer173Applies-to Ext. Doc. No.
372Payment Buffer290Exported to Payment File
379Detailed Cust. Ledg. Entry43Ledger Entry Amount
380Detailed Vendor Ledg. Entry43Ledger Entry Amount
386Entry No. Amount Buffer5Start Date
386Entry No. Amount Buffer6End Date
400XBRL Linkbase8File Name
427IC Outbox Sales Line63Shipment No.
427IC Outbox Sales Line64Shipment Line No.
427IC Outbox Sales Line6600Return Receipt No.
427IC Outbox Sales Line6601Return Receipt Line No.
431Handled IC Outbox Sales Line63Shipment No.
431Handled IC Outbox Sales Line64Shipment Line No.
431Handled IC Outbox Sales Line6600Return Receipt No.
431Handled IC Outbox Sales Line6601Return Receipt Line No.
437IC Inbox Purchase Line63Receipt No.
437IC Inbox Purchase Line64Receipt Line No.
437IC Inbox Purchase Line6600Return Shipment No.
437IC Inbox Purchase Line6601Return Shipment Line No.
441Handled IC Inbox Purch. Line63Receipt No.
441Handled IC Inbox Purch. Line64Receipt Line No.
441Handled IC Inbox Purch. Line6600Return Shipment No.
441Handled IC Inbox Purch. Line6601Return Shipment Line No.
454Approval Entry21Pending Approvals
454Approval Entry22Record ID to Approve
454Approval Entry23Delegation Date Formula
454Approval Entry26Number of Approved Requests
454Approval Entry27Number of Rejected Requests
454Approval Entry29Entry No.
454Approval Entry30Workflow Step Instance ID
454Approval Entry31Related to Change
455Approval Comment Line8Record ID to Approve
456Posted Approval Entry22Posted Record ID
456Posted Approval Entry23Delegation Date Formula
456Posted Approval Entry26Number of Approved Requests
456Posted Approval Entry27Number of Rejected Requests
456Posted Approval Entry28Iteration No.
456Posted Approval Entry29Entry No.
457Posted Approval Comment Line8Posted Record ID
458Overdue Approval Entry15Record ID to Approve
472Job Queue Entry10Report Output Type
472Job Queue Entry44User Language ID
472Job Queue Entry45Printer Name
472Job Queue Entry46Report Request Page Options
472Job Queue Entry47Rerun Delay (sec.)
700Error Message8Table Number
700Error Message10Context Record ID
700Error Message11Field Name
700Error Message12Table Name
740VAT Report Header7VAT Registration No.
740VAT Report Header10Report Period Type
740VAT Report Header11Report Period No.
740VAT Report Header12Report Year
740VAT Report Header16Processing Date
740VAT Report Header19Test Export
740VAT Report Header20Notice
740VAT Report Header21Revocation
740VAT Report Header28Trade Type
740VAT Report Header29EU Goods/Services
740VAT Report Header31Total Base
740VAT Report Header32Total Amount
740VAT Report Header33Total Number of Supplies
740VAT Report Header34Total Number of Lines
740VAT Report Header40Company Name
740VAT Report Header41Company Address
740VAT Report Header42Country/Region Name
740VAT Report Header48City
740VAT Report Header49Post Code
740VAT Report Header50Tax Office ID
740VAT Report Header51Sign-off Place
740VAT Report Header52Sign-off Date
740VAT Report Header53Signed by Employee No.
740VAT Report Header54Created by Employee No.
741VAT Report Line17EU Service
741VAT Report Line24Number of Supplies
741VAT Report Line30Trade Type
741VAT Report Line31Line Type
741VAT Report Line32Related Line No.
741VAT Report Line33Trade Role Type
741VAT Report Line50Corrected Reg. No.
741VAT Report Line51Corrected Amount
741VAT Report Line54Registration No.
741VAT Report Line99System-Created
741VAT Report Line101VAT Report to Correct
741VAT Report Line102Able to Correct Line
743VAT Report Setup11000Source Identifier
743VAT Report Setup11001Transmission Process ID
743VAT Report Setup11002Supplier ID
743VAT Report Setup11003Codepage
743VAT Report Setup11004Registration ID
743VAT Report Setup11005Export Cancellation Lines
762Account Schedules Chart Setup3Description
762Account Schedules Chart Setup51Look Ahead
801Online Map Parameter Setup9Directions from Location Serv.
1226Payment Export Data28Sender Bank Name – Data Conv.
1226Payment Export Data29Sender Bank Name
1226Payment Export Data32Sender Bank Account Currency
1226Payment Export Data33Sender Bank Country/Region
1226Payment Export Data35Sender Bank Clearing Std.
1226Payment Export Data36Sender Bank Clearing Code
1226Payment Export Data37Sender Bank Address
1226Payment Export Data38Sender Bank City
1226Payment Export Data39Sender Bank Post Code
1226Payment Export Data45Recipient Email Address
1226Payment Export Data46Recipient ID
1226Payment Export Data48Recipient Bank Clearing Std.
1226Payment Export Data49Recipient Bank Clearing Code
1226Payment Export Data84Payment Type
1226Payment Export Data89Invoice Amount
1226Payment Export Data90Invoice Date
1226Payment Export Data91Recipient County
1226Payment Export Data92Recipient Bank County
1226Payment Export Data93Sender Bank County
1226Payment Export Data130Importing Code
1226Payment Export Data131Importing Date
1226Payment Export Data132Importing Description
1226Payment Export Data133Costs Distribution
1226Payment Export Data134Message Structure
1226Payment Export Data135Own Address Info.
1226Payment Export Data171Transit No.
1226Payment Export Data200Format Command
1226Payment Export Data201Format Remittance Info Type
1226Payment Export Data220Format Payment Type
1226Payment Export Data221Format Expense Code
1226Payment Export Data222Format Text Code
1226Payment Export Data283Format Form Type
1228Payment Jnl. Export Error Text7Additional Information
1228Payment Jnl. Export Error Text8Support URL
5079Marketing Setup71Exchange Service URL
5079Marketing Setup72Exchange Account User Name
5079Marketing Setup73Exchange Account Password Key
5108Sales Line Archive1700Deferral Code
5108Sales Line Archive1702Returns Deferral Start Date
5110Purchase Line Archive1700Deferral Code
5110Purchase Line Archive1702Returns Deferral Start Date
5700Stockkeeping Unit7385Next Counting Start Date
5700Stockkeeping Unit7386Next Counting End Date
5741Transfer Line43Appl.-to Item Entry
5911Service Mgt. Setup950Copy Time Sheet to Order
5992Service Invoice Header710Document Exchange Identifier
5992Service Invoice Header711Document Exchange Status
5992Service Invoice Header712Doc. Exch. Original Identifier
5994Service Cr.Memo Header710Document Exchange Identifier
5994Service Cr.Memo Header711Document Exchange Status
5994Service Cr.Memo Header712Doc. Exch. Original Identifier
7302Bin Content6503Unit of Measure Filter
7380Phys. Invt. Item Selection12Next Counting Start Date
7380Phys. Invt. Item Selection13Next Counting End Date
8613Config. Package Table28Processing Report ID
8614Config. Package Record10Parent Record No.
8616Config. Package Field14Create Missing Codes
8616Config. Package Field15Mapping Exists
8619Config. Template Line16Language ID
9053Sales Cue9Average Days Delayed
9053Sales Cue10Sales Inv. – Pending Doc.Exch.
9053Sales Cue12Sales CrM. – Pending Doc.Exch.
9054Finance Cue22New Incoming Documents
9054Finance Cue23Approved Incoming Documents
9054Finance Cue24OCR Pending
9054Finance Cue25OCR Completed
9054Finance Cue26Requests to Approve
9054Finance Cue27Requests Sent for Approval
9054Finance Cue28User ID Filter
9060SB Owner Cue11Sales Invoices
9060SB Owner Cue12Unpaid Sales Invoices
9060SB Owner Cue13Overdue Sales Invoices
9060SB Owner Cue14Sales Quotes
9060SB Owner Cue30Purchase Invoices
9060SB Owner Cue31Unpaid Purchase Invoices
9060SB Owner Cue32Overdue Purchase Invoices
11014Certificate4PFX File
11014Certificate5Elster Certificate
11014Certificate6PFX File Password
2000000053Access Control8Scope
2000000053Access Control9App ID
2000000053Access Control10App Name
2000000071Object Metadata30Hash
2000000071Object Metadata33Object Subtype
2000000071Object Metadata34Has Subscribers
2000000073User Personalization27Locale ID
2000000073User Personalization30Time Zone
2000000079Object Tracking15App Package ID
2000000079Object Tracking18Tenant ID
2000000112Server Instance7Management Port
2000000112Server Instance8Status
2000000120User11Authentication Email
2000000120User14Contact Email
2000000121User Property7Authentication Object ID

Removed table fields:

Table No.Table NameField No.Field Name
27Item7382Next Counting Period
79Company Information11020House Number
79Company Information11021Floor Number
79Company Information11022Room Number
744VAT Report Line Relation3Line No.
5600Fixed Asset11100Start of Use Date
5700Stockkeeping Unit7382Next Counting Period
7380Phys. Invt. Item Selection8Next Counting Period
8613Config. Package Table6No. of Database Records
11004Data Export Record Source20No. Of Sessions
11014Certificate3Certificate Ref.
2000000072Profile6Owner SID
2000000072Profile9Owner ID
2000000100Debugger Breakpoint3User SID
2000000100Debugger Breakpoint5User ID
2000000104Debugger Watch3User SID
2000000104Debugger Watch5User ID

Removed tables: 452, 453, 464, 465, 1234, 2000000203



Tables Changes from Nav 2013 to Nav 2016

For upgrade processes from nav 2013 to nav 2016 i have developed following table comparison.

New in Nav 2016:

60Document Sending Profile
61Electronic Document Format
130Incoming Document
131Incoming Documents Setup
132Incoming Document Approver
133Incoming Document Attachment
134Posted Docs. With No Inc. Buf.
135Acc. Sched. KPI Web Srv. Setup
136Acc. Sched. KPI Web Srv. Line
137Inc. Doc. Attachment Overview
249VAT Registration Log
477Report Inbox
487Business Chart User Setup
710Activity Log
870Social Listening Setup
871Social Listening Search Topic
980Payment Registration Setup
981Payment Registration Buffer
983Document Search Result
1150Report Totals Buffer
1200Bank Export/Import Setup
1205Credit Transfer Register
1206Credit Transfer Entry
1209Credit Trans Re-export History
1213Data Exchange Type
1214Intermediate Data Import
1220Data Exch.
1221Data Exch. Field
1222Data Exch. Def
1223Data Exch. Column Def
1224Data Exch. Mapping
1225Data Exch. Field Mapping
1227Data Exch. Line Def
1231Positive Pay Entry
1232Positive Pay Entry Detail
1235XML Structure
1237Transformation Rule
1240Positive Pay Header
1241Positive Pay Detail
1242Positive Pay Footer
1248Ledger Entry Matching Buffer
1249Bank Stmt Multiple Match Line
1250Bank Statement Matching Buffer
1251Text-to-Account Mapping
1252Bank Pmt. Appl. Rule
1259Bank Data Conv. Bank
1260Bank Data Conv. Service Setup
1261Service Password
1265Data Exch. Field Mapping Buf.
1270OCR Service Setup
1271OCR Service Document Template
1275Doc. Exch. Service Setup
1280Bank Clearing Standard
1281Bank Data Conversion Pmt. Type
1293Payment Application Proposal
1294Applied Payment Entry
1295Posted Payment Recon. Hdr
1296Posted Payment Recon. Line
1299Payment Matching Details
1300Mini Customer Template
1301Mini Item Template
1302Mini Dimensions Template
1303Mini Vendor Template
1304Sales Price and Line Disc Buff
1305Mini Pages Mapping
1306Mini User Removed Instructions
1310Mini Chart Definition
1311Mini Last Used Chart
1312Mini Trial Balance Setup
1313Mini Activities Cue
1319Sales by Cust. Grp.Chart Setup
1400Service Connection
1500Workflow Buffer
1502Workflow Step
1504Workflow Step Instance
1505Workflow – Table Relation
1506Workflow Table Relation Value
1507Workflow Step Buffer
1508Workflow Category
1509WF Event/Response Combination
1510Notification Template
1511Notification Entry
1512Notification Setup
1513Notification Schedule
1514Sent Notification Entry
1515Dynamic Request Page Entity
1516Dynamic Request Page Field
1520Workflow Event
1521Workflow Response
1522Workflow Event Queue
1523Workflow Step Argument
1524Workflow Rule
1525Workflow – Record Change
1526Workflow Record Change Archive
1530Workflow Step Instance Archive
1540Workflow User Group
1541Workflow User Group Member
1550Restricted Record
1650Curr. Exch. Rate Update Setup
1700Deferral Template
1701Deferral Header
1702Deferral Line
1703Deferral Post. Buffer
1704Posted Deferral Header
1705Posted Deferral Line
5127Deferral Header Archive
5128Deferral Line Archive
5329CRM Redirect
5330CRM Connection Setup
5331CRM Integration Record
5335Integration Table Mapping
5336Integration Field Mapping
5337Temp Integration Field Mapping
5338Integration Synch. Job
5339Integration Synch. Job Errors
5340CRM Systemuser
5341CRM Account
5342CRM Contact
5343CRM Opportunity
5344CRM Post
5345CRM Transactioncurrency
5346CRM Pricelevel
5347CRM Productpricelevel
5348CRM Product
5349CRM Incident
5350CRM Incidentresolution
5351CRM Quote
5352CRM Quotedetail
5353CRM Salesorder
5354CRM Salesorderdetail
5355CRM Invoice
5356CRM Invoicedetail
5357CRM Contract
5359CRM Team
5360CRM Customeraddress
5361CRM Uom
5362CRM Uomschedule
5363CRM Organization
5364CRM Businessunit
5365CRM Discount
5366CRM Discounttype
5367CRM Account Statistics
5368CRM NAV Connection
5370CRM Synch. Job Status Cue
5371Service Connection Error
5372Service Connection Status
8628Config. Field Mapping
8640Config. Text Transformation
8650DataExch-RapidStart Buffer
9000User Group
9001User Group Member
9002User Group Access Control
9003User Group Permission Set
9070Accounting Services Cue
9170Profile Resource Import/Export
9500Email Item
9600XML Schema
9610XML Schema Element
9611XML Schema Restriction
9612Referenced XML Schema
9650Custom Report Layout
9651Report Layout Selection
9656Report Layout Update Log
9657Custom Report Selection
9701Cue Setup
9800Table Permission Buffer
130400CAL Test Suite
130401CAL Test Line
130402CAL Test Codeunit
130403CAL Test Enabled Codeunit
130404CAL Test Method
130405CAL Test Result
130406CAL Test Coverage Map
2000000114Document Service
2000000150NAV App Object Metadata
2000000151NAV App Tenant App
2000000152NAV App Data Archive
2000000153NAV App Installed App
2000000160NAV App
2000000161NAV App Dependencies
2000000162NAV App Capabilities
2000000163NAV App Object Prerequisites
2000000165Tenant Permission Set
2000000166Tenant Permission

Removed from table list:

452Approval Setup
453Approval Code
464Approval Templates
465Additional Approvers
1234CSV Buffer
2000000203Database Key Groups



How to: Get field values from dynamically loaded tables

If you need field values from different tables at runtime within the same function, then there is a nice solution:


// variablestableType, Option : CompInfo,PayTermresult : ARRAY [5] OF Variant OnRun()LoadDynamicallyFieldValues(tableType::CompInfo, result);MESSAGE(FORMAT(result[1])+', '+FORMAT(result[2])+', '+FORMAT(result[3]));LoadDynamicallyFieldValues(tableType::PayTerm, result);MESSAGE(FORMAT(result[1])+', '+FORMAT(result[2])+', '+FORMAT(result[3]));LoadDynamicallyFieldValues(tableType : 'CompInfo,PayTerm';VAR result : ARRAY [5] OF Variant)CASE tableType of tableType::CompInfo: begin  compInfo.GET;  recID := compInfo.RECORDID;  GetFieldValue(recID,'Name',result[1]);  GetFieldValue(recID,'Address',result[2]);  GetFieldValue(recID,'City',result[3]); END; tableType::PayTerm: BEGIN  payTerm.FINDFIRST;  recID := payTerm.RECORDID;  GetFieldValue(recID,'Code',result[2]);  GetFieldValue(recID,'Discount %',result[3]);  GetFieldValue(recID,'Description',result[1]); END;END;GetFieldValue(recID : RecordID;fieldName : Text;VAR fieldValue : Variant)recRef.GET(recID);field.SETRANGE(FieldName,fieldName);field.SETRANGE(TableNo,recID.TABLENO);IF field.FINDFIRST THEN BEGIN fieldRef := recRef.FIELD(field."No."); fieldValue := fieldRef.VALUE;END;



Get next object version number

Every developer has sometimes the issue: What is my next version number for the new object ? If there is a couple of developers working in the some database, you’ll need a kind of a version control.

I’ve developed a page, which calculates the next version number for a defined version prefix. The version sytax is: <PREFIX><Main No.>.<2-digit Sub No.>.

Let’s start with a list of pages with different version list, version ARCH1.00 to ARCH1.06. It does not matter, if the version list of an object contains more than one value.

After running the page set the version prefix, here ARCH, and push action “Get next version”. We get then the new version: ARCH1.07.

You can download the page here.


Export Nav Objects by Code

Exporting locked nav objects can be a problem when importung in target database. it’s not that easy to unlock them in the target database. So for that you can export nav objects by code and check Lock status before exporting.

Create a new report, add dataitem Object. set report to processingonly.

select dataitem Object, set property ReqFilterFields to Type,ID.
set request page: add field Path (Text).

add following code to trigger OnOpenPage:

Object.SETRANGE(Type,Object.Type::Table);Path := 'c:\temp';

add following code to report trigger OnPreReport():

finsql := 'C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\finsql.exe';IF NOT FILE.EXISTS(finsql) THEN  ERROR('finsql not found');

additional add that code to trigger Object – OnAfterGetRecord():

IF Object.Locked THEN BEGIN  Message(FORMAT(Object.Type)+'-'+FORMAT(Object.ID)+' is locked.');  // alternatively unlock object, then try again.  // Object.Locked := FALSE;  // Object.MODIFY;end ELSE begin  arguments := 'command=exportobjects,file=%1,servername=%2,database=%3,filter="Type=%4;ID=%5",ntauthentication=1';  arguments := STRSUBSTNO(arguments,Path+'\'+FORMAT(Object.Type)+'-'+FORMAT(Object.ID)+'.fob','localhost','Cronus',Object.Type,Object.ID);  Process.Start(finsql,arguments);  result := result + FORMAT(Object.Type)+'-'+FORMAT(Object.ID)+'\';END;

to trigger Object – OnPostDataItem():


Global Variables:

Process DotNet System.Diagnostics.Process.'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'arguments Textfinsql TextPath Textresult Text


How to work with big item descriptions

Sometimes it’s needed to save very long descriptions, but in Nav text fields can have only 250 characters. Additional you may want to search in these long text values. You can add a couple of these text fields to save long texts or save the text in text files and add them to the item. But what about searching? Not that easy.
An other option to save long texts is the usage of blob fields. For that option i developed a solution.

First add a new field “Description 3” to table Item, type BLOB, subtype Memo.
Then edit page Item Card, add a global variable Desc3Txt of type text with no length. Add the variable as new field to the item card, Editable=False, MultiLine=Yes.
Add following code to trigger OnAfterGetRecord in item card page:

// InStr | InStreamCALCFIELDS("Description 3");IF "Description 3".HASVALUE THEN BEGIN  "Description 3".CREATEINSTREAM(InStr);  InStr.READ(Desc3Txt);END;

Add to trigger Desc3Txt – OnAssistEdit()

// OutStr | OutStream // EditCtrl | DotNet | Archer.TextEdit.'Archer.TextEdit, Version=, Culture=neutral, PublicKeyToken=1465b259ee2284cb' CLEAR(EditCtrl);EditCtrl := EditCtrl.TextEdit;EditCtrl.Load(Desc3Txt);EditCtrl.ShowDialog;Desc3Txt := EditCtrl.Save;EditCtrl.Close;CLEAR(EditCtrl);"Description 3".CREATEOUTSTREAM(OutStr);OutStr.WRITE(Desc3Txt);MODIFY;CurrPage.UPDATE;

Page item card with new multiline text field “Description 3” and Assist Button.

Clicking on Assist Button starts the TextEdit Control and loads the current text. After changing the text and closing the text control, you are asked, if you want to change the text.

Now we need the opportunity to search within the new text/blob field. For that we need a new page Item Search. That new field cannot be searched using the standard search function.

Create a new page with objectid 50000, name Item Search. Add a group under the contentarea, add a global text variable SearchString, add a new field under the group with SearchString as SourceExpr. Add another group, add a new line with type part. Later we set the value for property PagePartID.

To show the search result we need another page: type listpart, objectid 50001, name Item Search Result. As source of the new page we need a new table: objectid 50000, name Item Search Result.

The new page 50001:

Properties: Editable=False, SourceTable=50001, SourceTableTemporary=Yes.

Now add global function SetData(SearchFilter : Text) to the new page. Add following code to the new function:

// local variables// Item, Record, Item // ItemSearchResultLine, Record, Item Search Result // InStr, InStream // Desc3Txt, Text // LineNo, Integer DELETEALL;LineNo := 10;Item.FINDSET;REPEAT  Item.CALCFIELDS("Description 3");  IF Item."Description 3".HASVALUE THEN BEGINItem."Description 3".CREATEINSTREAM(InStr);InStr.READTEXT(Desc3Txt);IF STRPOS(LOWERCASE(Desc3Txt),LOWERCASE(SearchFilter)) > 0 THEN BEGIN  "Line No." := LineNo;  "Item No." := Item."No.";  Description := Item.Description;  "Description 2" := Item."Description 2";  "Description 3" := COPYSTR(Desc3Txt,1,250); // first 250 chars  INSERT(FALSE);  LineNo += 10;END;  END;UNTIL Item.NEXT = 0;CurrPage.UPDATE(FALSE);

Now you can set the property PagePartID in the part line in page 50000 to 50001.

For calling the search function we need a Search button in page 50000.
Add following code to trigger Search – OnAction()

The new Item Search Page with a search result.

You can download the TextEdit Control here.

You could simplify the solution by:
* Search page: Use only page 50001, add a second group at the top with field SearchString. So page 50000 is not needed.
* Page Item Card: remove the textedit control and the according code, set field Desc3Txt to editable, add the code to fill the blob field “description 3” using outstream to trigger Desc3Txt-OnValidate.



Mass data import

There was an issue with importing all UK post codes from a csv file, about 3m post codes. Importing using rapidstart services (excel import) can cause buffer overflow messages. excel itself has row/size limitations. Increasing MaxNoOfXMLRecordsToSend in config file ClientUserSettings.config from default value 5000 to e.g. 20000 is no problem and can help. Also changing MaxUploadSize in server config file CustomSettings.config is an option (also available via nav service admin console). Better choice for mass data import are dataports (older nav versions) and xmlports.

Another option is to develope a report, which imports the file contents and loops through the lines. quite simple, no memory issues.

create a new report, add following code to trigger OnPreReport():

OnPreReport()// variables PostCode, Record, Post Code file, File fileName, Text, 250 line, Text, 1024 dlg, Dialog idx, Integer txtValue, Text, 100// code PostCode.DELETEALL(FALSE); COMMIT; dlg.OPEN('#1###### #2######'); // show progress dialog idx := 1;// downloaded post code file from as test file, size: 500k, 2.1m lines, some of them contain obsolete post codes fileName := 'c:\temp\England postcodes.csv'; file.WRITEMODE := FALSE; file.TEXTMODE := TRUE; file.OPEN(fileName); file.READ(line); // skip header line WHILE file.READ(line) > 0 DO BEGIN   // skip obsolete post codes: 2. value = No   IF SELECTSTR(2,line) = 'Yes' THEN BEGIN  PostCode.Code := SELECTSTR(1,line); PostCode.VALIDATE(City,GetValue(SELECTSTR(15,line))); PostCode.County := GetValue(SELECTSTR(8,line)); PostCode."Country/Region Code" := 'GB'; PostCode.INSERT; dlg.UPDATE(1,idx); dlg.UPDATE(2,PostCode.Code); idx += 1;   END; END; file.CLOSE; dlg.CLOSE; MESSAGE(FORMAT(idx) + ' post codes imported.');LOCAL GetValue(txtValue : Text[100]) : Text txtValue := DELCHR(txtValue,'<','"'); // remove leading "   txtValue := DELCHR(txtValue,'>','"'); // remove trailing " IF STRLEN(txtValue) > 30 THEN // fields City,County are Text[30]   txtValue := COPYSTR(txtValue,1,30); // cut text, leading 30 chars EXIT(txtValue);

report runs with 1.5m valid lines/records about 5 min.


Incoming Documents instead of Links

If you want to add files to a nav document like orders, then you normally use the link factbox. For that you have to link files on file shares, local paths are not allowed (not reachable from other systems). That only works, if the current user has the needed permission and the network path is reachable. There is also a problem, if the file is moved, deleted or the permissions were changed.

One alternative to add files to nav documents is the usage of third party components like dms systems (document management systems).

Since Nav 2016 there is the “Incoming Documents” feature available. This is used to add the original scanned document to the purchase order. This document is saved then in the database, not on a file share (network path).


The advantages:

  • the nav client is not dependent on permission settings and network issues.
  • No issue with moving and removing of the file on the network path or changing the file permissions.
  • You can use that feature in general to add any kind of file, not only the scanned order.

The disadvantages:

  • No versioning: the same with the links factbox
  • When viewing/editing the added file, changes are not saved back.

To replace an added document (file) you can click on “Incoming Document” in the according factbox. The “Incoming Document” page opens. Here click on Actions/”Replace Main Attachment” and select a different document or a newer version.


The feature is a kind of a small dms system with some nice features and interesting advantages compared to the links factbox. You can simply add files to the Incoming documents list, then create a nav document like a purchase invoice with that file as attachment.



Textual Data Export by Configuration

An often by customers wanted feature is to get a data export to a text/csv file, which can then be edited in excel or text editor.

Yes, you can use Rapidstart Services. But with that feature you can only export data in excel format, not in text format. That’s ok for editing in Excel and reimport the changed data back to NAV. For data exchange scenarios you always need text format. An other point is, that it’s quite often said, Rapidstart Services are not that easy to use for end users and has a couple of bugs. I also read quite often that this feature is not recommended at all. So what else can a customer do? Contact the NAV partner, who then shall develope a new xmlport, report or codeunit to do that job. That’s the usual way.

The german localised version of Dynamics Nav contains a really nice feature, simply called “Data Exports”. You can find it in menu /Departments/Administration/Application Setup/Financial Management/General/Data Exports. This feature is mainly used to export business data for auditing purposes according the GDPdU (Process for data access and testability of digital documents).

With the feature “Data Exports” there is an additional way for these kind of issues, it is possible to export data to csv files without developing! Great thing. So let’s have a look, how we can use that.

First we need at least one definition group. Then we define the according record definition (Button “Record Definitions”).

Here we need values for Code, Description and Export Path. In that case i want to export Sales Orders. “DTD File Name” is a mandatory field. I checked the code. The file is not processed, using different kinds of dtd files does not change anything in the resulting export files. The name of the dtd file is simply written to the file index.xml, which contains the datastructure. To get the thing run we create an empty text file, call it empty.dtd and add only one line of text:


Save the text file and click on Button Import in menu tab “DTD File”, select file empty.dtd and click ok. After that the file is imported and the file’s name is set to column “DTD File Name”.

Now let’s define the table and the fields. For that select the record definition and click on “Record Source”.

In the header area we set table no. to 36 (Sales Header) and the Key No. to 1 (Primary Key). Optional you can set the period field no., here to 19 (Order Date). In Column Table Filter you can set filters, if you do not want to export all records. Here i set the field to “Sales Header: Document Type=Order”, because i only want to export Sales Orders.

In the Fields Area we add the export fields by clicking on the Add Button. The key fields should be in first place. With MoveUp and MoveDown you can change the position of the fields. That’s all.

You can, if you wish, add more tables in the header area, you can set relationships, e.g. between Sales Header and Sales Line. But for now let’s run the thing. First we click Validate and get “The data export record source validated correctly.”, means all is ok.

So, after closing the page “Data Export Records Source” we are back in page “Data Export Records Definitions”. Here we click on Button Export in menu tab “Process”. Report 11015 “Export Business Data” is started:

Here set start and end date. These fields are mandatory and are applied to the period field of the header line, in that case to field “Order Date”. After execution we get some files in the export path, subfolder SALESORDER.

File empty.dtd is simply copied, file index.xml contains the data structure:

and file SalesHeader.txt contains the exported data (csv format):

There we are!
We got a csv export file without any development, only by configuration!

This can, as told before, extended by adding more lines in the header area of page “record source”:

Here you can see 2 header lines “Sales Header” and “Sales Line”, which is indented and has a defined relationship shown in page relationship in the bottom right corner of the above screenshot. In that case you get 2 export files, one per table.

Important: If you are interested in that feature, you could download the german localised version. But … for that you need the according license!
Exporting the nav objects as text export and renumbering them to the 50000s object range is possible, but illegal! So if you like that kind of feature, try to redevelope that functionality. Do not copy these objects to your database, do not reuse the code. If you want to do that, please contact your Nav partner or Microsoft for license clarifcation. You could suggest to add that functionality to the W1 version.

For more details about that feature follow this.