Programming Microsoft® Dynamics™ NAV:
Create, modify, and maintain applications in NAV 5.0, the latest version of the ERP application formerly known as Navision
www.PACKTPUB.com  FREE ONLINE EDITION: Read full chapters online, download free samples from the book and more...
Book Contents Index > Chapter 6
Introduction
1: The Basic Ingredients
2: Tables
3: Fields
4: Forms
5: Reports
6: Introduction to C/SIDE and C/AL
7: Intermediate C/AL
8: Advanced NAV Development
9: Designing NAV Modifications

10: External Interfaces
11: Design to Succeed

Index

Latest Updates

Free Chapter:

Chapter 1: The Basic Ingredients [1.64 MB PDF]

Code Download

Contact us

 

Chapter 6: Introduction to C/SIDE and C/AL

Language is a process of free creation; its laws and principles are fixed, but the manner in which the principles of generation are used is free and infinitely varied—Noam Chomsky

In the preceding chapters, we introduced the basic building block objects of NAV tables, forms, and reports. In each of these we reviewed the triggers within various areas such as the overall object, controls, data items, the Request Form, and so on. The purpose of each trigger is to be a container in which C/AL code can reside. The triggers are "fi red", i.e. invoked or executed, when certain pre-defi ned events occur.

In this chapter, we're going to begin learning more about the C/AL programming language. We'll start with the basics, but we won't spend a lot of time on those. Many things you already know from programming in other languages apply to C/AL. In addition, many of the basic defi nitions can be found in the Application Designer's Guide and in the online C/AL Reference Guide that is part of the NAV Help.

Our goal here is to make it faster for you to learn how to navigate and productively use the C/SIDE development environment as well as to be comfortable in C/AL. We'll focus on the tools and processes that you use most often. Hopefully, you will also learn concepts that you can apply in more complex tasks down the road.

As with most programming languages, you have considerable fl exibility for defi ning your own model for your code structure. However, when you are inserting new code within existing code, there's a strong argument for utilizing the model that already exists in the original code. When you feel compelled to improve on the model of the existing code, do so in small increments.

Chapter 6: Introduction to C/SIDE and C/AL

  • Essential Navigation
    • Object Designer
      • Starting a New Object
      • Some Designer Navigation Pointers
      • Exporting Objects
      • Importing Objects
      • Text Objects
    • Object Numbers
    • Some Useful Practices
    • Changing Data Definitions
    • Saving and Compiling
    • Some C/AL Naming Conventions
    • Variables
      • Global Variables
      • Local Variables
      • Special Working Storage Variables
    • A Definition of Programming in C/SIDE
    • Functions
    • Basic C/AL Syntax
      • Assignment and Punctuation
      • Wild Cards
      • Expressions
      • Operators
  • Some Basic C/AL
      • MESSAGE, ERROR, CONFIRM, and STRMENU Functions
    • SETCURRENTKEY Function
    • SETRANGE Function
    • GET Function
    • FIND–NEXT Functions
    • BEGIN–END Compound Statement
    • IF–THEN–ELSE Statement
    • Indenting Code
  • Some Simple Coding Modifications
    • Adding a Validation to a Table
    • Adding Code to Enhance a Report
  • Summary
   

 

Paperback 480 pages
Released: October 2007
ISBN: 1904811749
ISBN 13: 978-1-904811-74-9

     

 




View the book details
on PacktPub.com

 


 

  This website is owned and maintained by Packt Publishing Ltd, 2007. All rights reserved. Terms and Conditions