Microsoft ® Business Solutions–Navision ® 4.0 Development II - C/SIDE Solution Development Day 2.

Slides:



Advertisements
Similar presentations
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Advertisements

CC SQL Utilities.
GP2013 (R2) New features in GP2013 (R2). New Ribbon for windows Edit List is the Print button on the right without the paper background Action pane can.
1 of 39 DA1245 Enhanced Transaction Tracking Last updated: March-2009 DA1245 Enhanced Transaction Tracking.
CPIT 102 CPIT 102 CHAPTER 1 COLLABORATING on DOCUMENTS.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
J4www/jea Week 3 Version Slide edits: nas1 Format of lecture: Assignment context: CRUD - “update details” JSP models.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Databases and Processing Modes. Fundamental Data Storage Concepts and Definitions What is an entity? An entity is something about which information is.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
With Microsoft Access 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 4: Working with Forms.
MS Access: Database Concepts Instructor: Vicki Weidler.
MS Access Advanced Instructor: Vicki Weidler Assistant:
1 of 29 Microsoft ® Business Solutions–Navision ® Development I – C/SIDE Introduction – Day 1.
Database Applications – Microsoft Access Lesson 2 Modifying a Table and Creating a Form 45 slides in presentation Accessibility check 9/14.
Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 4.
Agenda Journalling More Embedded SQL. Journalling.
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
With Microsoft Access 2007 Volume 1© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access 2007 Volume 1 Chapter.
Crystal And Elliott Edward M. Kwang President. Crystal Version Standard - $145 Professional - $350 Developer - $450.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
XP New Perspectives on Microsoft Office Access 2003 Tutorial 12 1 Microsoft Office Access 2003 Tutorial 12 – Managing and Securing a Database.
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
RealProperty PLUS Commercial I Escalations and Passthroughs © 2009 Domin-8 Enterprise Solutions LLC. All rights reserved.
Press Esc to Exit ©2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in.
Modular Programming Chapter Value and Reference Parameters computeSumAve (x, y, sum, mean) ACTUALFORMAL xnum1(input) ynum2(input) sumsum(output)
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
TxEIS Security A role-based solution October 2010.
Microsoft ® Business Solutions–Navision ® 4.0 Development II - C/SIDE Solution Development Day 5.
Key Applications Module Lesson 21 — Access Essentials
Chapter 17 Creating a Database.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Now, please open your book to page 60, and let’s talk about chapter 9: How Data is Stored.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
1 of 20 Microsoft ® Business Solutions–Navision ® Development I – C/SIDE Introduction Day 2.
Database Management Systems (DBMS)
Gold – Crystal Reports Introductory Course Cortex User Group Meeting New Orleans – 2011.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
Lesson 4.  After a table has been created, you may need to modify it. You can make many changes to a table—or other database object—using its property.
13- 1 Chapter 13.  Overview of Sequential File Processing  Sequential File Updating - Creating a New Master File  Validity Checking in Update Procedures.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Microsoft Dynamics ® NAV 2009 Service Management.
1 Intro stored procedures Declaring parameters Using in a sproc Intro to transactions Concurrency control & recovery States of transactions Desirable.
SAP DEVELOPMENT BASICS Bohuslav Tesar. TRAINING OVERVIEW Amazing life of ABAP developer ;) SAP introduction ABAP basics ABAP Reporting.
Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 3.
Getting Started in Access 1 Using an existing Database Database Window Table Design View Parts of a Table Views in Access Navigating in Access Entering.
Retele de senzori Curs 2 - 1st edition UNIVERSITATEA „ TRANSILVANIA ” DIN BRAŞOV FACULTATEA DE INGINERIE ELECTRICĂ ŞI ŞTIINŢA CALCULATOARELOR.
ITMT 1371 – Window 7 Configuration 1 ITMT Windows 7 Configuration Chapter 8 – Managing and Monitoring Windows 7 Performance.
Microsoft SQL is known as RDMS (Relational Database Management System) which is developed by Microsoft and is highly used at corporate and enterprise.
3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. PeopleSoft General Ledger 9.2 New Features 9.2 Release New Features.
Dynamics NAV 2013 Quick Guide 5-4 Fixed Assets
Best Practices for Dynamics NAV Administration and Security
Microsoft Office Access 2010 Lab 2
Oracle Subledger Accounting
Chapter 2: System Structures
Inventory Transactions庫存交易
Microsoft Office Access 2003
Fundamentals of Databases
DIY GP Maintenance Paul Johnson.
Unit J: Creating a Database
Presentation transcript:

Microsoft ® Business Solutions–Navision ® 4.0 Development II - C/SIDE Solution Development Day 2

Managing Master Files Review Questions

Multilanguage – Text Constants

4 of 65 Text Constants Defined as C/AL Globals Captions for different languages (ConstValueML) Used instead of text strings in C/AL code –Definition: Text001:ENU=‘%1 must be positive.’ –Usage: ERROR(Text005,FIELDCAPTION(Amount)); Use table and field captions to replace the placeholders in text constants

Matrix Forms

6 of 65 Matrix Form Form SourceTable fields (SourceTable = Item) Matrix Header TextBox Matrix Box (MatrixSourceTable = Location) Form SourceTable field (SourceTable = Item) Calculated per Item and Location Filter and Options (SourceTable = Item)

7 of 65 Matrix Forms OnAfterGetRecord (Form) OnAfterGetRecord (Matrix) Triggers Fires for each source table record (Item) Fires for each matrix source table record (Location) Used to update calculated matrix fields (Inventory) C/AL code example: SETRANGE("Location Filter",CurrForm.ItemAvailMatrix.MatrixRec.Code); CALCFIELDS(Inventory);

Table Types

9 of 65 Table Types Database Table –Regular table type to store data in the database Virtual Table –Information provided by the system Temporary Table –Temporary variable to buffer table data on client side System Table –Created automatically by the system

10 of 65 Table Types Table that contains information provided by the system Information is read-only Data is not stored in the database Table definition cannot be modified Can be used, for example, to show dates in different periods (Date table) Virtual Table

11 of 65 Table Types Temporary variable based on a database table Data stored temporarily in workstation’s memory Write transactions principle does not apply Reduces load on server and network Can be used, for example, in posting functions (table Invoice Post. Buffer) Temporary Table

12 of 65 Table Types Tables created automatically by the system Data is stored in the database Table definition can be modified Can be used by the system, for example, to manage security and permissions (User, Member Of and User Role tables) System Table

13 of 65 Additional Functions CALCDATE DATE2DMY DATE2DWY ROUND RUNMODAL CONFIRM MESSAGE ERROR TESTFIELD WORKDATE VALIDATE FORMAT COUNT

Managing Registrations Lab

15 of 65 Conclusion We have now created the tables and forms necessary to register participants in seminars Now that we can enter transaction information, we need to create a posting routine

Managing Registrations Review Questions

17 of 65 Review Multilanguage – Using Text Constants Matrix Forms Table Types

Structure of Journal Forms

19 of 65 Structure of Journal Forms Template Batch Line Form Types Line

20 of 65 Structure of Journal Forms General Journal Templates –Set up different journal windows –Template for batches –No posting possible General Journal Batches –Different batches for each template –Set up for journals, like Bal. Account –Posting possible General Journal Line –Each line belongs to one template and batch –Transaction information for posting, such as Date, Account and Amount –Posting possible General Journal Forms

Journal Posting Routines

22 of 65 Journal Posting Routines The Difference between a Journal and a Ledger Standard Journal to Ledger Posting Routines The Main Three Codeunits The Theory behind Document Posting The Codeunits used in Document Posting

23 of 65 The Difference between a Journal and a Ledger Ledger Protected Table Primary Key - Entry No. An Integer Entry Numbers Start at 1 Many Secondary Keys Holds the Majority of the Detail Information for the Functional Area NEVER INSERT OR DELETE! Journal Temporary Work Area Main Table is Journal Line Two Supplemental Tables Journal Template Journal Batch Compound Primary Key Line Number Incremented Automatically Journal Posting Routines

24 of 65 Numbering of Journal Posting Routines 1Journal Check Line 2Journal Post Line 3Journal Post Batch 1Journal Check Line 2Journal Post Line 3Journal Post Batch 0Journal Management 1Journal Post 2Journal Post+Print 3Journal Batch Post 4Journal Batch Post+Print 5Show Ledger 0Journal Management 1Journal Post 2Journal Post+Print 3Journal Batch Post 4Journal Batch Post+Print 5Show Ledger Posting routines Management and “starter” routines Journal Posting Routines

25 of 65 Standard Journal to Ledger Posting Routines “Starter” Routines - Just ask Question(s) and Go –1. Post - Posts One Batch –2. Post and Print - Posts One Batch and Prints Register –3. Batch Post - Posts Multiple Batches –4. Batch Post and Print - Posts Multiple Batches and Prints Each Register

26 of 65 Standard Journal to Ledger Posting Routines Posting Routines - Don’t Ask, Just Do the Work –1. Check Line - Test the Journal Line without Disturbing Server –2. Post Line - Transfer Data from Journal Line to Ledger Line(s) –3. Post Batch - Process a User-Entered Journal

27 of 65 The Main Three Posting Routine Codeunits Check Line Post Line Post Batch

28 of 65 The Main Three Posting Routine Codeunits Check Line –Checks One Journal Record (Line) –No User Interface –Never Reads or Updates Journal Table –Does Data Entry Testing which does not Disturb Server Test to See if User Entered all Required Data Tests that Certain Business Rules have been Followed Tests for Valid Posting Dates Tests may Read a Setup Record, but only if it can be done Once per Posting Process

29 of 65 The Main Three Posting Routine Codeunits Post Line –Posts One Journal Record (Line) –No User Interface –Never Reads or Updates Journal Table –Calls Check Line for its Journal Record –Does Validity Testing which can Read Records from Other Tables –Creates Ledger Entry or Entries (needs Permissions to do so) –Applies (links) Ledger Records as Necessary –Can be called from Other Posting Routines

30 of 65 The Main Three Posting Routine Codeunits Post Batch –Posts Records from One Batch of Journal Table –Displays Progress to User, but no User Input Allowed –Calls Check Line for Each Record in Journal –Does Total / Balance / Recurring Testing –Calls Post Line for Each Record in Journal –Deletes or Updates Journal Records

31 of 65 Architecture of Journal Posting Routines Post Batch Codeunit X3 Post Batch Codeunit X3 Post Line Codeunit X2 Post Line Codeunit X2 Check Line Codeunit X1 Starter Routine Journal Posting Routines

Document Posting Routines

33 of 65 The Theory Behind Document Posting What is a Document? Breaking it Down

34 of 65 The Theory Behind Document Posting Document Posting Routines

35 of 65 Document Posting Routines Post document Codeunit X0 Post document Codeunit X0 Post document preparation Codeunit X1 / X2 Architecture of Document Posting Type Gen. Journal-Post Line (CU12) Gen. Journal Line Table Item Journal-Post Line (CU22) Item Journal Line Table

36 of 65 Document Posting Routines 0Document - Post 1Document - Post (Yes/No) 2Document - Post +Print 1Document - Post (Yes/No) 2Document - Post +Print Posting function Start functions Numbering of Document Posting Routines

37 of 65 Document Posting Routines A sales document is posted primarily by codeunit 80 – Sales-Post You can however post an entire batch of sales invoice documents by calling report 297

38 of 65 Document Posting Routines Focusing in on Codeunit 80 (Sales-Post) –First, it creates a Journal Line using a record variable (usually called GenJnlLine, ResJnlLine, ItemJnlLine, etc...) for the appropriate journal –All of the necessary fields are assigned values from the Header or the Line (mostly the Line) –Other values are calculated or retrieved from the posting group tables –Finally, the record variable (never inserted into the table) is passed to the PostLine Codeunit for the appropriate journal –All postings to the G/L go through the Gen. Jnl.-Post Line Codeunit

Table Locking

40 of 65 Table Locking Different locking in Microsoft Navision and Microsoft ® SQL Server ® All write operations automatically lock the table or the record (SQL Server only) in use Use LOCKTABLE to explicitly lock a table in C/AL Use RECORDLEVELLOCKING to test for SQL Server Use COMMIT to end a write transaction manually only where needed

41 of 65 Table Locking Microsoft Navision Database Server Whole table is locked when issuing LOCKTABLE Consistent versions for read tasks Optimistic concurrency for multiple records by means of LOCKTABLE(TRUE,TRUE) SQL Server Option Records are locked when accessed after LOCKTABLE When no LOCKTABLE: Dirty reads (”Read Uncommitted”) Optimistic concurrency supported for single records by means of Timestamp field added to all tables Major Differences between Microsoft Navision and SQL Server

Performance Issues

43 of 65 Low Impact Programming Low Impact on the Application Low Impact on the Server Low Impact on the Network Low Impact on the Database

44 of 65 Low Impact on the Application Modifying Existing Objects –Tables –Reports –Codeunits –Forms

45 of 65 Low Impact on the Application Tables –In some cases, it is better to add a new table than to modify an existing table –It is better to add a new field to an existing table than to modify the meaning of an existing field –It is better to change the Caption property than the Name property –It is better to change the caption of an existing field than to add a new field, if the only purpose is to change the name –Try to write new functionality into separate functions

46 of 65 Low Impact on the Application Reports –Always create a copy of an existing report and modify the copy –Document changes well –Try to write new functionality into separate functions

47 of 65 Low Impact on the Application Codeunits –Try to write new functionality into separate functions

48 of 65 Low Impact on the Application Forms –Most changes –Hard to document –Try to write new functionality into separate functions using local variables

49 of 65 Low Impact on the Server COMMIT LOCKTABLE INSERT, MODIFY, DELETE CALCSUMS, CALCFIELDS Keys Validity Testing

50 of 65 Low Impact on the Server COMMIT –Handled automatically for almost all applications –Should almost never be used manually

51 of 65 Low Impact on the Server LOCKTABLE –Limit to only where necessary. –Insert, modify, rename, and delete will lock automatically.

52 of 65 Low Impact on the Server INSERT, MODIFY, DELETE –Try to structure to not use the return value.

53 of 65 Low Impact on the Server CALCSUMS, CALCFIELDS –Use when possible rather than looping through records. –Takes about the same amount of time as one Get command.

54 of 65 Low Impact on the Server Keys –Define new keys when appropriate –Select keys carefully, based on filters –Attach SumIndexFields to the most efficient key

55 of 65 Low Impact on the Server Validity Testing –When possible, perform tests that do not involve the server first –Use temporary tables

56 of 65 Low Impact on the Network MODIFYALL, DELETEALL CALCSUMS, CALCFIELDS Filters

57 of 65 Low Impact on the Network MODIFYALL, DELETEALL –Use these commands when possible, vs. MODIFY and DELETE –Use appropriate keys and filters

58 of 65 Low Impact on the Network CALCSUMS, CALCFIELDS –Multiple parameters can sum many fields with one function call (and one network packet)

59 of 65 Low Impact on the Network Filters –Use when possible, even if not part of a key

60 of 65 Low Impact on the Database SumIndexFields Keys Duplication of Data

61 of 65 Low Impact on the Database SumIndexFields –Take up a significant amount of space, only use where beneficial

62 of 65 Low Impact on the Database Keys –Take up a significant amount of space, only use where beneficial –Assign infrequently used keys to Key Groups and deactivate when not needed

63 of 65 Low Impact on the Database Duplication of Data –Avoid where possible

Debugging Tools

65 of 65 Debugging Tools Navision Debugger –Checks C/AL code lines –Uses breakpoints –Contains several windows to watch fields, variables, and stack Code Coverage –Logs objects and code –Shows not-executed lines in different color (red)