Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Microsoft Dynamics NAV 7 Programming Cookbook
Microsoft Dynamics NAV 7 Programming Cookbook

Microsoft Dynamics NAV 7 Programming Cookbook: Learn to customize, integrate and administer NAV 7 using practical, hands-on recipes , Second Edition

eBook
₱1742.99 ₱2490.99
Paperback
₱3112.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Microsoft Dynamics NAV 7 Programming Cookbook

Chapter 1. String, Dates, and Other Data Types

In this chapter, we will cover the following recipes:

  • Retrieving the system date and time

  • Retrieving the work date

  • Determining the day, month, and year from a given date

  • Using the date formula to calculate dates

  • Converting a value to a formatted string

  • Creating an array

  • Creating an option variable

  • Converting a string to another data type

  • Manipulating string contents

Introduction


Data types are the base component in C/AL (Client/server Application Language) programming. Most of the data types are equivalent to the data types used in other programming language. Boolean, integer, decimal, dates, and strings are the most used data types in C/AL programming.

As developers, our job is to build a business tool that will manipulate the data input by users and make sure that data stored in tables is meaningful. Most of this data will be of the decimal, string, and date data types. NAV is, after all, a financial system at heart. At its most basic level, it cares about three things: "How much money?" (decimal), "What was it used for?" (string), and "When was it used?" (date).

The recipes in this chapter are very basic, but they will help you to understand the basics of C/AL coding. All recipes are accompanied by actual C/AL code from NAV objects.

Retrieving the system date and time


Most times, we need to capture the system date and time of users' actions on NAV. This recipe will illustrate how to get the system date and time.

How to do it...

  1. Let's create a new codeunit from Object Designer.

  2. Now add the following code into the OnRun trigger of the codeunit:

    MESSAGE('Todays Date: %1\Current Time: %2', TODAY, TIME);
  3. To complete the development of the codeunit, save and close it.

  4. On executing the codeunit, you should see a window similar to the one in the following screenshot:

How it works...

The TODAY keyword returns the date and the TIME keyword returns the time from the NAV Server system.

In the case of the older version of the NAV client—specifically the classic client—the date and time are taken from the client computer, which allows users to manipulate the system clock as per their personal requirement.

You can also retrieve the system date and time all at once using the CURRENTDATETIME function. The date and time can be extracted using the DT2DATE and DT2TIME functions respectively.

Note

For a complete list of date functions, run a search for the date function and the time function in the Developer and IT Pro Help option in the Help menu of Microsoft NAV Development Environment

There's more...

The change log is a base NAV module that allows you to track changes to specific fields in tables. The following code can be found in the 423, Change Log Management codeunit in the InsertLogEntry() method:

ChangeLogEntry.INIT;
ChangeLogEntry."Date and Time" := CURRENTDATETIME;
ChangeLogEntry.Time := DT2TIME(ChangeLogEntry."Date and Time");

Here, instead of using the WORKDATE function, we use the CURRENTDATETIME function and then extract the time using the DT2TIME function. The system designers can just do the following setup:

ChangeLogEntry.Date := TODAY;
ChangeLogEntry.Time := TIME;

The advantage of using CURRENTDATETIME over TODAY and TIME is minimal. CURRENTDATETIME makes one request to the system while the second method makes two. It is possible that another operation or thread on the client machine could take over between retrieving the date and time from the computer; however, this is very unlikely. The operations could also take place right before and after midnight, generating some very strange data. The requirements for your modification will determine which method is best suited, but generally CURRENTDATETIME is the correct method to use.

See also

  • Retrieving the work date

  • Determining the day, month, and year from a given date

  • Converting a value to a formatted string

Retrieving the work date


To perform tasks such as completing transactions for a date that is not the current date, you may have to temporarily change the work date. This recipe will show you how to determine what that actual work date is as well as when and where you should use it.

Getting ready

  1. Navigate to Application Menu | Set Work Date or select the date in the status bar at the bottom of Microsoft Dynamics NAV.

  2. Input the work date in the Work Date field or select it from the calendar.

How to do it...

  1. Let's get started by creating a new codeunit from Object Designer.

  2. Then add the following code into the OnRun trigger of the codeunit:

    MESSAGE('Work Date: %1\Todays Date: %2\Current Time: %3',WORKDATE, TODAY, TIME);
  3. To complete the task, save and close the codeunit.

  4. On executing the codeunit, you should see a window similar to the following screenshot:

How it works...

To understand WORKDATE, we have used two more keywords in this recipe. The work date is a date internal to the NAV system. This date is returned using the WORKDATE keyword. It can be changed at any time by the user. The next date is TODAY; it's a keyword to retrieve the present date that provides the date from the system. In the end, we used the TIME keyword, which provides current time information from the system clock.

Note

It is important to understand the difference between the NAV work date and the computer system date; they should be used in specific circumstances. When performing general work in the system, you should almost always use the WORKDATE keyword. In cases where you need to log information and the exact date or time when an action occurred, you should use TODAY or TIME, or CURRENTDATETIME.

There's more...

The following code can be found in the 38, Purchase Header table, in the UpdateCurrencyFactor() method:

IF "Posting Date" <> 0D THEN
CurrencyDate := "Posting Date"
ELSE
CurrencyDate := WORKDATE;

Looking at this code snippet, we can see that if a user has not provided any specific posting date, the system will assign the value WORKDATE as the default value for the posting date.

See also

  • Determining the day, month, and year from a given date

  • Converting a value to a formatted string

  • The Checking for conditions using an IF statement recipe in Chapter 2, General Development

  • The Using the CASE statement to test multiple conditions recipe in Chapter 2, General Development

Determining the day, month, and year from a given date


Sometimes it is necessary to retrieve only part of a date. NAV has built-in functions to do just that. We will show you how to use them in this recipe.

How to do it...

  1. Let's create a new codeunit from Object Designer.

  2. Then add the following global variables by navigating to View | C/AL Globals (Alt + V + B):

    Name

    Type

    Day

    Integer

    Month

    Integer

    Year

    Integer

  3. Write the following code into the OnRun trigger of the codeunit:

    Day := DATE2DMY(TODAY, 1);
    Month := DATE2DMY(TODAY, 2);
    Year := DATE2DMY(TODAY, 3);
    MESSAGE('Day: %1\Month: %2\Year: %3', Day, Month, Year);
  4. To complete the task, save and close the codeunit.

  5. On executing the codeunit, you should see a window similar to the following screenshot:

How it works...

The Date2DMY function is a basic feature of NAV. The first parameter is a date variable. This parameter can be retrieved from the system using TODAY or WORKDATE. Additionally, a hardcoded date such as 01312010D or a field from a table, such as Sales Header or Order Date can be used as a first parameter. The second parameter is an integer that tells the function which part of the date to return. This number can be 1, 2, or 3, and corresponds to the day, month, and year (DMY) respectively.

Note

NAV has a similar function called Date2DWY. It will return the week of the year instead of the month if 2 is passed as the second parameter.

There's more...

The following code can be found in the 485, Business Chart Buffer table in the UpdateCurrencyFactor() method of the GetNumberOfYears() function:

EXIT(DATE2DMY(ToDate,3) - DATE2DMY(FromDate,3));

This function has two parameters of type date and it returns the value in integer. The basic usage of this function is to calculate the duration between two dates in terms of years.

See also

  • Retrieving the system date and time

  • Retrieving the work date

  • The Repeating code using a loop recipe in Chapter 2, General Development

  • The Checking for conditions using an IF statement recipe in Chapter 2, General Development

Using the date formula to calculate dates


The date formula allows us to determine a new date based on a reference date. This recipe will show you how to use the built-in CALCDATE NAV function for date calculations.

How to do it...

  1. Let's start by creating a new codeunit from Object Designer.

  2. Add the following global variable by navigating to View | C/AL Globals (Alt + V + B):

    Name

    Type

    CalculatedDate

    Date

  3. Write the following code into the OnRun trigger of the codeunit:

    CalculatedDate := CALCDATE('CM+1D', 010110D);
    MESSAGE('Calculated Date: %1', CalculatedDate);
  4. Now save and close the codeunit.

  5. On executing the codeunit, you should see a window similar to the following screenshot:

How it works...

The CALCDATE() function takes in two parameters: a calculation formula and a starting date. The calculation formula is a string that tells the function how to calculate the new date. The second parameter tells the function which date it should start with. A new date is returned by this function, so the value must be assigned to a variable.

The following units can be used in the calculation formula:

Unit

Description

D

Day

WD

Weekday

W

Week

M

Month

Q

Quarter

Y

Year

These units may be different depending on what language version NAV is running under.

You have two options to place the number before the unit. It can either be a standard number ranging between 1 and 9 or the letter C, which stands for current. These units can be added and subtracted to determine a new date based on any starting date.

Calculation formulas can become very complex. The best way to fully understand them is to write your own formulas to see the results. Start out with basic formulas such as 1M + 2W - 1D and move on to more complex ones, such as –CY + 2Q - 1W.

There's more...

The following code is part of the CalcNumberOfPeriods() function of the 485, Business Chart Buffer table:

"Period Length"::Week:
  NumberOfPeriods := (CALCDATE('<-CW>',ToDate)- CALCDATE('<CW>',FromDate)) DIV 7;

The preceding code snippet will return the difference between two dates in terms of weeks. <-CW> will provide a week start date of ToDate whereas <CW> will provide a week end day of FromDate. The difference between the calculated days will be divided by 7 to get the total number of weeks.

For more details on CALCDATE, visit the following URL:

http://msdn.microsoft.com/en-us/library/dd301368(v=nav.70).aspx

See also

  • Retrieving the system date and time

  • Retrieving the work date

  • Determining the day, month, and year from a given date

  • The Checking for conditions using an IF statement recipe in Chapter 2, General Development

Converting a value to a formatted string


There will be many occasions when you will need to display information in a certain way or multiple variable types on a single line. The FORMAT function will help you change almost any data type into a string that can be manipulated in any way you see fit.

How to do it...

  1. Let's get started by creating a new codeunit from Object Designer.

  2. Then add the following global variable:

    Name

    Type

    Length

    FormattedDate

    Text

    30

  3. Now write the following code into the OnRun trigger of the codeunit:

    FormattedDate := FORMAT(TODAY, 0, '<Month Text> <Day,2>,<Year4>');
    MESSAGE('Today is %1', FormattedDate);
  4. To complete the task, save and close the codeunit.

  5. On executing the codeunit, you should see a window similar to the following screenshot:

How it works...

The FORMAT function takes one to three parameters. The first parameter is required and can be of almost any type: date, time, integer, decimal, and so on. This parameter is returned as a string.

The second parameter is the length of the string to be returned. The default, zero, means that the entire string will be returned, a positive number tells the function to return a string of exactly that length, and a negative number returns a string not larger than that length.

There are two options for the third, and final, parameter. One is a number, representing a predefined format you want to use for the string, and the other is a literal string. In the example, we used the actual format string. The text contained in the angular brackets (< >) will be parsed and replaced with the data in the first parameter.

Note

There are many predefined formats for dates. Run a search for Format Property in the Developer and IT Pro Help option in the Help menu of Microsoft NAV Development Environment or visit the following URL:

http://msdn.microsoft.com/en-us/library/dd301059(v=nav.70).aspx

There's more...

The following code can be found on the OnValidate() trigger of the Starting Date field from the 50, Accounting Period table:

Name := FORMAT("Starting Date",0,Text000);

In the preceding code, Text000 is a text constant and carries the <Month Text> value. This code will return month of "Starting Date" in text format.

See also

  • Retrieving the system date and time

  • Retrieving the work date

  • Determining the day, month, and year from a given date

  • Converting a string to another data type

  • The Checking for conditions using an IF statement recipe in Chapter 2, General Development

  • The Advanced filtering recipe in Chapter 3, Working with Tables, Records, and Queries

  • The Retrieving data using the FIND and GET statements recipe in Chapter 3, Working with Tables, Records, and Queries

Creating an array


Creating multiple variables to store related information can be time consuming. It leads to more code and more work. Using an array to store related and similar types of information can speed up development and lead to much more manageable code. This recipe will show you how to create and access array elements.

How to do it...

  1. Let's create a new codeunit from Object Designer.

  2. Add the following global variables by navigating to View | C/AL Globals (Alt + V + B):

    Name

    Type

    i

    Integer

    IntArray

    Integer

  3. Now, with the cursor on the IntArray variable, navigate to View | Properties (Shift + F4).

  4. In the Property window, set the following property:

    Property

    Value

    Dimensions

    10

  5. Write the following code into the OnRun trigger of the codeunit:

    FOR i := 1 TO ARRAYLEN(IntArray) DO BEGIN
      IntArray[i] := i;
      MESSAGE('IntArray[%1] = %2', i, IntArray[i]);
    END;
  6. To complete the task, save and close the codeunit.

  7. On executing the codeunit, you should see a window similar to the following screenshot:

How it works...

An array is a single variable that holds multiple values. The values are accessed using an integer index. The index is passed within square brackets ([ ]).

Note

NAV provides several functions to work with arrays. For instance, ARRAYLEN returns the number of dimensions of the array and COPYARRAY will copy all of the values from one array into a new array variable. You can find a complete list of the array functions in the Developer and IT Pro Help option in the Help menu of Microsoft NAV Development Environment.

There's more...

Open the 365, Format Address codeunit. Notice that the first function, FormatAddr, has a parameter that is an array. This is the basic function that all of the address formats use. It is rather long, so we will discuss only a few parts of it here.

This first section determines how the address should be presented based on the country of the user. Variables are initialized depending on which line of the address should carry certain information. These variables will be the indexes of our array.

CASE Country."Contact Address Format" OF
  Country."Contact Address Format"::First:
    BEGIN
      NameLineNo := 2;
      Name2LineNo := 3;
      ContLineNo := 1;
      AddrLineNo := 4;
      Addr2LineNo := 5;
      PostCodeCityLineNo := 6;
      CountyLineNo := 7;
      CountryLineNo := 8;
    END;

Then we will fill in the array values in the following manner:

AddrArray[NameLineNo] := Name;
AddrArray[Name2LineNo] := Name2;
AddrArray[AddrLineNo] := Addr;
AddrArray[Addr2LineNo] := Addr2;

Scroll down and take a look at all of the other functions. You'll see that they all take in an array as the first parameter. It is always a text array of length 90 with eight dimensions. These are the functions you will call when you want to format an address. To use this codeunit correctly, we will need to create an empty array with the specifications listed before and pass it to the correct function. Our array will be populated with the appropriately formatted address data.

See also

  • Manipulating string contents

  • The Using the CASE statement to test multiple conditions recipe in Chapter 2, General Development

Creating an option variable


If you need to force the user to select a value from a predefined list, an option is the way to go. This recipe explains how to create an Option variable and access each of its values.

How to do it...

  1. Let's create a new codeunit from Object Designer.

  2. Then add the following global variable:

    Name

    Type

    ColorOption

    Option

  3. With the cursor on the ColorOption variable, navigate to View | Properties or (Shift + F4).

  4. In the Property window, set the following property:

    Property

    Value

    OptionString

    None,Red,Green,Blue

  5. Now write the following code into the OnRun trigger of the codeunit:

    ColorOption := ColorOption::Green;
    CASE ColorOption OF
      ColorOption::None: MESSAGE('No Color Selected');
      ColorOption::Red: MESSAGE('Red');
      ColorOption::Green: MESSAGE('Green');
      ColorOption::Blue: MESSAGE('Blue');
    END;

  6. Save and close the codeunit.

  7. On executing the codeunit, you should see a window similar to the one shown in the following screenshot:

How it works...

An Option is a field or variable that stores one value from a selectable list. In a form, this list will appear as a dropdown from which the user can select a value. The list of options is stored as a comma-separated string in the OptionString property. If we query such stored values from a SQL database, we will receive an integer value representing each option. In our current example, the integer value has been mapped with options, where None = 0, Red = 1, Green = 2, and Blue = 3.

These values are accessed using the variable_name::option_name syntax. The first line of the example assigns one of the possible values (Green) to the variable. Then we use a CASE statement to determine which of the values were selected.

Note

There are many predefined formats for dates. Run a search for Format Property in the Developer and IT Pro Help option in the Help menu of Microsoft NAV Development Environment.

There's more...

The Option fields are prevalent throughout the NAV system, but most commonly on documents. In NAV, many documents share the same table. For example, sales quotes, orders, invoices, and return orders are all based on the Sales Header table. In order to distinguish between the types, there is an Option field called Document Type. Design the 36, Sales Header table to see the available options for this field.

Now design the 80, Sales-Post codeunit. Examine the OnRun trigger. At the start of the function, you will see the following code:

  CASE "Document Type" OF
  "Document Type"::Order:
    Receive := FALSE;
  "Document Type"::Invoice:
    BEGIN
      Ship := TRUE;
      Invoice := TRUE;
      Receive := FALSE;
    END;
  "Document Type"::"Return Order":
    Ship := FALSE;
  "Document Type"::"Credit Memo":
    BEGIN
      Ship := FALSE;
      Invoice := TRUE;
      Receive := TRUE;
    END;
  END;

This is a common example of how options are used in NAV. You can scroll through the codeunit to find more examples.

See also

  • The Using the CASE statement to test multiple conditions recipe in Chapter 2, General Development

Converting a string to another data type


Sometimes, a string representation isn't enough. In order to perform certain actions, you need your data to be in a certain format. For example, we are reading data from a text file, so our entire data is simple text, which needs to be converted into an appropriate data type to use it in NAV. This recipe will show you how to change that data into a format that you can use.

How to do it...

  1. Let's start by creating a new codeunit from Object Designer.

  2. Now add the following global variables:

    Name

    Type

    Length

    DateText

    Text

    30

    DateValue

    Date

     
  3. Write the following code into the OnRun trigger of the codeunit:

    DateText := '01/10/2012';
    EVALUATE(DateValue, DateText);
    MESSAGE('Microsoft Dynamics NAV 2013 launch date is %1', DateValue);
  4. To complete the development, save and close the codeunit.

  5. On executing the codeunit, you should see a window similar to the one shown in the following screenshot:

How it works...

The EVALUATE() function takes in two parameters. The first is a variable of the type that we want our value to be converted into. This could be date, time, Boolean, integer, or any other simple data type. This parameter is passed by reference, meaning that the result of the function is stored in that variable. There is no need to do a manual assignment to get a return value.

The second parameter is the string that you need to convert. This text is usually stored in a field or variable, but can also be hardcoded.

Note

EVALUATE() returns a Boolean value when executed. If the conversion is successful, it returns TRUE or 1; otherwise, it returns FALSE or 0. If the function returns FALSE, an error will be generated.

There's more...

The EVALUATE() function is widely used in NAV C/AL code. The following code snippet is taken from the CheckCreditCardData() function of the 825, Do Payment Mgt codeunit:

EVALUATE (IntValue1,FORMAT(TODAY,0,'<Year>'));
EVALUATE (IntValue2,COPYSTR(DOPaymentCreditCard."Expiry Date",3,2));
IF IntValue1 > IntValue2 THEN
  ERROR (Text006, CreditCardNo, DOPaymentCreditCard.FIELDCAPTION ("No."));

Before completing a transaction, the credit card's validity period needs to be checked. The preceding code extracts the year from the current date provided by the TODAY function and the expiry date of the credit card. Both the values are evaluated using the relational operator. If the card has expired, the system will execute a predefined error message in text constant Text006.

See also

  • Converting a value to a formatted string

  • The Checking for conditions using an IF statement recipe in Chapter 2, General Development

  • The Passing parameters by reference recipe in Chapter 2, General Development

Manipulating string contents


It can be very useful to parse a string and retrieve certain values. This recipe will show you how to examine the contents of a string and manipulate that data.

How to do it...

  1. Let's create a new codeunit from Object Designer.

  2. Add a function called RemoveNonNumeric. It should return a text variable called NewString.

  3. Add the following parameters for the same function:

    Name

    Type

    Length

    String

    Text

    30

  4. Now add the following global variables:

    Name

    Type

    Length

    OldPhoneNumber

    Text

    30

    NewPhoneNumber

    Text

    30

    I

    Integer

     
  5. Write the following code to the RemoveNonNumeric function:

    FOR i := 1 TO STRLEN(String) DO BEGIN
    IF String[i] IN ['0', '1', '2', '3', '4', '5', '6', '7','8','9'] THEN
      NewString := NewString + FORMAT(String[i]);
    END;
  6. Write the following code into the OnRun trigger of the codeunit:

    OldPhoneNumber := '(230) 299-876';
    NewPhoneNumber := RemoveNonNumeric(OldPhoneNumber);
    MESSAGE('Old Phone Number: %1\New Phone Number: %2', OldPhoneNumber, NewPhoneNumber);
  7. To complete the task, save and close the codeunit.

  8. On executing the codeunit, you should see a window similar to the one shown in the following screenshot:

How it works...

A string is actually an array of characters. The same array syntax will be used to access the individual characters of the string.

We start with a FOR loop that begins at the first character, with index 1, and goes on until we reach the end of our string. This is determined using the STRLEN() function, which stands for string length. As the first index is 1, the last index will be N or the number of characters in the string.

Next, we access the character at that index using square brackets. If the character is a number, meaning we want to keep it because it is a numeric value, we add it to our resulting string.

Note

NAV comes with plenty of built-in string manipulation functions to remove characters, return substrings, find characters within strings, and many more. A search in the Developer and IT Pro Help option of the Help menu of Microsoft NAV Development Environment for string functions will give you a complete list.

There's more...

The CheckIBAN function of the 79, Company Information table is a simple example of string manipulation to validate IBAN (International Bank Account Number). IBAN is internationally agreed on and adopted. It consists of up to 34 alphanumeric characters: the first two letters are the country code, then two check digits, and finally a country-specific Basic Bank Account Number. The same is validated by manipulating the input string using various functions. The following code gives you an example for the same:

IF IBANCode = '' THEN
  EXIT;
IBANCode := DELCHR(IBANCode);
Modulus97 := 97;
IF (STRLEN(IBANCode) <= 5) OR (STRLEN(IBANCode) > 34) THEN
  IBANError;
ConvertIBAN(IBANCode);
WHILE STRLEN(IBANCode) > 6 DO
  IBANCode := CalcModulus(COPYSTR(IBANCode,1,6),Modulus97) + COPYSTR(IBANCode,7);
EVALUATE(I,IBANCode);
IF (I MOD Modulus97) <> 1 THEN
  IBANError;

There are a few more functions used to validate the string; such as ConvertIBAN, CalcModulus, and ConvertLetter. These functions can give you a basic idea to write your own code.

For more complex examples, please follow the DecomposeRowID() function in the 6500, Item Tracking Management codeunit. The code evaluates the value stored in the Source RowId field of the 6508, Value Entry Relation table.

See also

  • Converting a value to a formatted string

  • Creating an array

  • The Repeating code using a loop recipe in Chapter 2, General Development

  • The Checking for conditions using an IF statement recipe in Chapter 2, General Development

Left arrow icon Right arrow icon

Key benefits

  • Integrate NAV with external applications, using the C/AL or SQL server
  • Develop .NET code to extend NAV programming possibilities
  • Administer the Microsoft NAV 7 server and database

Description

Microsoft Dynamics NAV 7 is a business management solution that helps simplify and streamline highly specialized business processes. Learning NAV programing in NAV 7 gives you the full inside view of an ERP system. Microsoft Dynamics NAV 7 Programming Cookbook covers topics that span a wide range of areas such as integrating the NAV system with other software applications including Microsoft Office, and creating reports to present information from multiple areas of the system,. We will not only learn the essentials of NAV programming, you will also be exposed to the technologies that surround NAV including.NET programming, SQL Server and NAV system administration. Microsoft Dynamics NAV 7 Programming Cookbook is written in a direct, to-the-point style to help you get what you need and continue working in NAV. The first half of the cookbook will help programmers using NAV for the first time, by walking them through the building blocks of writing code and creating objects such as tables, pages, and reports. The second half focuses on using the technologies surrounding NAV to build better solutions. You will learn how to write .NET code that works with the NAV system and how to integrate the system with other software applications such as Microsoft Office or even custom programs. You will learn everything you need to know for developing all types of NAV CSIDE objects, as well as how to integrate and maintain a NAV system.

Who is this book for?

If you are a junior / entry-level NAV developer then the first half of the book is designed primarily for you. You may or may not have any experience programming. It focuses on the basics of NAV programming. If you are a mid-level NAV developer, you will find these chapters explain how to think outside of the NAV box when building solutions. There are also recipes that senior developers will find useful.

What you will learn

  • Build tables and perform complex actions on their data
  • Design different types of pages to display and interact with business data
  • Create reports to present information from multiple areas of the system
  • Build solutions that work with the entire Microsoft Office suite of products
  • Learn to work with SQL Server and execute basic queries against the NAV database
  • Diagnose and resolve code problems

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 24, 2013
Length: 312 pages
Edition : 2nd
Language : English
ISBN-13 : 9781849689113
Vendor :
Microsoft
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Sep 24, 2013
Length: 312 pages
Edition : 2nd
Language : English
ISBN-13 : 9781849689113
Vendor :
Microsoft
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 9,236.97
Getting Started with Dynamics NAV 2013 Application Development
₱2500.99
Programming Microsoft Dynamics NAV 2013
₱3622.99
Microsoft Dynamics NAV 7 Programming Cookbook
₱3112.99
Total 9,236.97 Stars icon

Table of Contents

12 Chapters
String, Dates, and Other Data Types Chevron down icon Chevron up icon
General Development Chevron down icon Chevron up icon
Working with Tables, Records, and Queries Chevron down icon Chevron up icon
Designing Pages Chevron down icon Chevron up icon
Report Design Chevron down icon Chevron up icon
Diagnosing Code Problems Chevron down icon Chevron up icon
Roles and Security Chevron down icon Chevron up icon
Leveraging Microsoft Office Chevron down icon Chevron up icon
OS Interaction Chevron down icon Chevron up icon
Integration Chevron down icon Chevron up icon
Working with the SQL Server Chevron down icon Chevron up icon
NAV Server Administration Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(8 Ratings)
5 star 50%
4 star 37.5%
3 star 0%
2 star 0%
1 star 12.5%
Filter icon Filter
Top Reviews

Filter reviews by




James Liang Nov 13, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book very useful for a new programer that they want to use C/AL to create/Modify Navision.Author use "How to do it" example then use "How It works" to explain how to use this functionand "There's more.." to show more example in Navision.
Amazon Verified review Amazon
Matthias Günther Feb 14, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
GUT
Amazon Verified review Amazon
Jón Heiðar Pálsson Jan 02, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book - easy to use and good examples.This book has helped programmers in Dynamics NAV. Keep on the good work.Jón Heiðar
Amazon Verified review Amazon
Baragiola Diego Oct 30, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been working with NAV during the last 10 years and I thought to know everything about NAV development, but I was wrong. I find this guide suitable for beginners as well as old consultants like me. The paths explained are very clear, with useful "How to do it..." sections. A must, to keep your knowledge up-to-date.
Amazon Verified review Amazon
Georgios T. Nov 05, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This is a great Book, helpful not only to programmers but also to any functional Consultant. It is analytical and very clear.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.