Quantcast
Viewing all 279 articles
Browse latest View live

Adding a field in an extension in Microsoft Dynamics Business Central or NAV

How To: Add a Field in an Extension in Microsoft Dynamics Business Central/NAV 

Image may be NSFW.
Clik here to view.
How to Add a Field in an Extension in Microsoft Dynamics 365 Business Central or Dynamics NAV

This blog explains how to add a field in an extension in Microsoft Dynamics NAV or Business Central. The steps involved are:

  1. Creating a table extension
  2. Adding a field to the table
  3. Creating a page extension
  4. Placing the field on the page

Step 1: Create a Table Extension

  1. Select View ->Command palette ->AL:Go!
  2. In launch.json (Figure1), change the following requirements as needed (see example in Figure 2):
    Image may be NSFW.
    Clik here to view.
    Figure 1 - launch.json in Microsoft Dynamics Business Central/NAV

    Figure 1 - launch.json in Microsoft Dynamics Business Central/NAV
    Image may be NSFW.
    Clik here to view.
    Figure 2 - Modified launch.json in Microsoft Dynamics Business Central/NAV

    Figure 2 - Modified launch.json in Microsoft Dynamics Business Central/NAV
  3. You might get an error in Helloworld.al. Following is how to correct it:
    Image may be NSFW.
    Clik here to view.
     Figure 3 - HelloWorld .al in Microsoft Dynamics Business Central/NAV

     Figure 3 - HelloWorld .al in Microsoft Dynamics Business Central/NAV
    Image may be NSFW.
    Clik here to view.
    Figure 4 - Navigating through view menu in Microsoft Dynamics Business Central/NAV

    Figure 4 - Navigating through view menu in Microsoft Dynamics Business Central/NAV​
  4. Download the symbols and make sure there are no errors in Helloworld.al.
    Image may be NSFW.
    Clik here to view.
    Figure 5 - Downloading the symbols in Microsoft Dynamics Business Central/NAV

    Figure 5 - Downloading the symbols in Microsoft Dynamics Business Central/NAV
  5. If the errors are cleared, delete the al file.
    Image may be NSFW.
    Clik here to view.
    Figure 6 - Error-free modified HelloWorld.al in Microsoft Dynamics Business Central/NAV

    Figure 6 - Error-free modified HelloWorld.al in Microsoft Dynamics Business Central/NAV
    Image may be NSFW.
    Clik here to view.
    Figure 7 - Deleting the HelloWorld.al in Microsoft Dynamics Business Central/NAV

    Figure 7 - Deleting the HelloWorld.al in Microsoft Dynamics Business Central/NAV​
  6. Create a new file for the table extension.
    Image may be NSFW.
    Clik here to view.
    Figure 8 - Creating a new file for a table extension in Microsoft Dynamics Business Central/NAV

    Figure 8 - Creating a new file for a table extension in Microsoft Dynamics Business Central/NAV
  7. Create the table extension using ttable ext snippet. 
    Image may be NSFW.
    Clik here to view.
    Figure 9 - Creating a new table extension in Microsoft Dynamics Business Central/NAV

    Figure 9 - Creating a new table extension in Microsoft Dynamics Business Central/NAV
  8. Add the extension name, id, and table name to extend. Remove the selected area in the field for adding the table field.
    Image may be NSFW.
    Clik here to view.
    Figure 10 - Adding the table id and name in Microsoft Dynamics Business Central/NAV

    Figure 10 - Adding the table id and name in Microsoft Dynamics Business Central/NAV

Step 2: Add the Table Field

  1. Add a field to the table using the tfield snippet.
    Image may be NSFW.
    Clik here to view.
    Figure 11 - Creating new table field in Microsoft Dynamics Business Central/NAV

    Figure 11 - Creating new table field in Microsoft Dynamics Business Central/NAV
  2. Add the following details according to the requirement. Add the field id, field name, and data type.
    Image may be NSFW.
    Clik here to view.
    Figure 12 - Adding a field to a table in Microsoft Dynamics Business Central/NAV

    Figure 12 - Adding a field to a table in Microsoft Dynamics Business Central/NAV

Step 3: Create a Page Extension

  1. Create the page extension file.
  2. In it, create a new page extension using the snippet.
    Image may be NSFW.
    Clik here to view.
    Figure 13 - Page extension using snippet in Microsoft Dynamics Business Central/NAV

    Figure 13 - Page extension using snippet in Microsoft Dynamics Business Central/NAV
  3. Write the id, name of the extension, and table name.
    Image may be NSFW.
    Clik here to view.
    Figure 14 - Page extension of item card in Microsoft Dynamics Business Central/NAV

    Figure 14 - Page extension of item card in Microsoft Dynamics Business Central/NAV
  4. Design the layout portion (adding the code to where the field is needed).

Step 4: Place the Field in the Page

  1. Choose the location where the field is needed.
    Image may be NSFW.
    Clik here to view.
    Figure 15 - Selecting the field location in Microsoft Dynamics Business Central/NAV

    Figure 15 - Selecting the field location in Microsoft Dynamics Business Central/NAV
    Image may be NSFW.
    Clik here to view.
    Figure 16 - Adding the page field in Microsoft Dynamics Business Central/NAV

    Figure 16 - Adding the page field in Microsoft Dynamics Business Central/NAV​
  2. In Figure 16, you will see that the field ItemStatus is needed after the item category code. After adding publish it using AL, publish or press F5.
    Image may be NSFW.
    Clik here to view.
    Figure 17 - Publishing an extension in Microsoft Dynamics Business Central/NAV

    Figure 17 - Publishing an extension in Microsoft Dynamics Business Central/NAV
  3. The output will look like Figure 17.
    Image may be NSFW.
    Clik here to view.
    Figure 18 - A field added in an extension in Microsoft Dynamics Business Central/NAV

    Figure 18 - A field added in an extension in Microsoft Dynamics Business Central/NAV

If you have any questions about Microsoft Dynamics NAV or Business Central functionality, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV. If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

Blog Tags: 

How to Install Microsoft Dynamics 365 Business Central

How To: Install Microsoft Dynamics Business Central 

Image may be NSFW.
Clik here to view.
How to Install Microsoft Dynamics 365 Business Central

Microsoft Dynamics 365 Business Central was released in June of 2018. If you haven’t had a chance to check it out, now is the time. If your company has purchased it, this blog provides step-by-step instructions on how to install it on your device.

  1. Download Microsoft Dynamics Business Central.
  2. Unzip the “Dynamics365BusinessCentralNA” folder.
  3. Double click on “Setup” and answer “Yes” to Administrator access to proceed with the installation.
    Image may be NSFW.
    Clik here to view.
    Figure 1: Selecting Setup Folder in Dynamics 365 Business Central.

    Figure 1: Selecting Setup Folder in Dynamics 365 Business Central.
  4. MSD365BC Window pops up and Click on Next.
    Image may be NSFW.
    Clik here to view.
    Figure 2: MSD365BC Dialog Box in Dynamics 365 Business Central

    Figure 2: MSD365BC Dialog Box in Dynamics 365 Business Central
  5. Select Advanced Installation Option.
    Image may be NSFW.
    Clik here to view.
    Figure 3. Selecting Advanced Installation Option in Dynamics 365 Business Central

    Figure 3. Selecting Advanced Installation Option in Dynamics 365 Business Central
  6. Select Choose an installation option.
    Image may be NSFW.
    Clik here to view.
    Figure 4: Choose an installation option.

    Figure 4: Choose an installation option
  7. Select an installation based upon your requirements.
    Image may be NSFW.
    Clik here to view.
    Figure 5: Custom installation of Dynamics 365 Business Central.

    Figure 5: Custom installation of Dynamics 365 Business Central.
  8. Select the components of your interest to be installed on your system.
    Image may be NSFW.
    Clik here to view.
    Figure 6: Microsoft Dynamics Business Central component selection

    Figure 6: Microsoft Dynamics Business Central component selection.

    Component Description:

    AL Development Environment: An AL language extension for Visual Studio Code for developing applications and extensions.

    Server Administration Tool: A Microsoft Management Console (MMC) for creating and configuring Business Central Server instances.

    Server: Business Central Server is a .NET-based Windows Service application that uses Windows Communication Framework to handle communication between clients and databases. It controls authentication, event logging, scheduled tasks, reporting and more.

    SQL Server Database Components: An SQL Server or Azure SQL Database contains application object definitions and business data.

    Microsoft Outlook Add-in: A component to synchronize data, such as to-dos, contacts, and tasks, between Business Central and Outlook. The Outlook Add-In uses Business Central web services.

    Automated Data Capture System: A system that tracks the movement of items in a warehouse.

    Web Server Components: An Internet Information Server (IIS) web site, provisioned with the Business Central Web Server components, that enables access from the Business Central Web client and mobile apps.

    Help Server: It is a website that installs on the specified server. The website includes Search and other navigation, and it provides context-sensitive Help for Microsoft Dynamics NAV Web client and Microsoft Dynamics NAV Windows client.

    Clickonce Installer Tools: Tools for implementing ClickOnce installation for the Dynamics NAV Client connected to Business Central.

    Dynamics NAV Client: It installs the Microsoft Dynamics NAV Windows Client in the system.
  9. Right click on the component of your interest and select run or run all from my computer, according to your requirement.
    Image may be NSFW.
    Clik here to view.
    Figure 7: Installs all Business Central Components.

    Figure 7: Installs all Dynamics 365 Business Central/NAV components.
  10. Check and change the parameters per your requirements.
    Image may be NSFW.
    Clik here to view.
    Figure 8. Parameter check when installing Dynamics 365 Business Central/NAV

    Figure 8: Parameter check when installing Dynamics 365 Business Central/NAV
    Image may be NSFW.
    Clik here to view.
    Figure 9: Business Central installation begins

    Figure 9: Business Central installation begins​
    Image may be NSFW.
    Clik here to view.
    Figure 10: Business Central installation is in progress

    Figure 10: Business Central installation is in progress
    Image may be NSFW.
    Clik here to view.
    Figure 11: Business Central installation has been completed.

    Figure 11: Business Central installation has been completed.
  11. Check to ensure Microsoft Dynamics 365 Business Central / Dynamics NAV has been installed in the system.
    Image may be NSFW.
    Clik here to view.
    Figure 12: Installed Dynamics Business Central / NAV in the system.

    Figure 12: Installed Dynamics Business Central / NAV in the system.           
  12. Open the Dynamics Business Central / NAV application.
    Image may be NSFW.
    Clik here to view.
    Figure 13: Open the Dynamics NAV / Business Central application

    Figure 13: Open the Dynamics NAV / Business Central application
    Image may be NSFW.
    Clik here to view.
    Figure 14: The Microsoft Dynamics NAV / 365 Business Central application

    Figure 14: The Microsoft Dynamics NAV / 365 Business Central application​

You now have Microsoft Dynamics 365 Business Central installed on your machine.

If you have any questions about this process, or if you have some ideas of your own, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV. If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

Microsoft Dynamics 365 Business Central AL Programming Basics – STRMENU Keyword

How To: Using the AL Programming Basic Keyword STRMENU in Microsoft Dynamics 365 Business Central Image may be NSFW.
Clik here to view.
How to Use the AL Programming Basic Keyword STRMENU in Dynamics 365 Business Central

This blog provides a step-by-step guide on how to use the STRMENU. The syntax is ”STRMENU(OptionMembers: Text, [DefaultNumber: Integer], [Instruction: Text]): Integer”. It creates a menu window that displays a series of options.

  1. Figure 1 shows a code unit with the members of the STRMENU keyword marked in red and the default member marked in green. So, when this code unit works, it creates a dialog box with three options to choose from. Those options are: “Create”, Display”, and “Delete.” The number “2”, which is marked in green, is the default action/option that will be marked as soon as the dialog box appears.
    Image may be NSFW.
    Clik here to view.
    Figure 1: Demo Code unit in Microsoft Dynamics 365 Business Central

    Figure 1: Demo Code unit in Microsoft Dynamics 365 Business Central
  2. Figure 2 shows the Page Extension for the same.
    Image may be NSFW.
    Clik here to view.
    Figure 2. Page Extension in Microsoft Dynamics 365 Business Central

    Figure 2. Page Extensionin Microsoft Dynamics 365 Business Central
  3. Figure 3 shows the output in Business Central. Click on the action.
    Image may be NSFW.
    Clik here to view.
    Figure 3: Clicking on the action in Microsoft Dynamics 365 Business Central

    Figure 3: Clicking on the action in Microsoft Dynamics 365 Business Central
  4. A dialog box will appear with the default action automatically marked (Figure 4). 
    Image may be NSFW.
    Clik here to view.
    Figure 4: A dialog box appears with the default action automatically marked in Microsoft Dynamics 365 Business Central

    Figure 4: A dialog box appears with the default action automatically marked in Microsoft Dynamics 365 Business Central
  5. The options used inside the STRMENU keyword can be used for performing different actions, as shown in Figure 5. This code unit implies that if the user selects the “Create” option from the dialog box, a new customer will be created with No.= ‘Create01’ and Name= ‘Demo1’. If the user selects “Display” option, the system will  find and display the name of the customer with no.=’Create01’. If the user selects the “Delete” option, the record with No.=’Create01’ will be deleted.
    Image may be NSFW.
    Clik here to view.
    Figure 5. Using the members of STRMENU dialog box to perform an action in Microsoft Dynamics 365 Business Central

    Figure 5: Using the members of STRMENU dialog box to perform an actionin Microsoft Dynamics 365 Business Central

This is just a small demonstration of how STRMENU can be used.If you have any questions about this function or other Dynamics 365 Business Central or NAV, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV development, check out our collection of NAV Development Blogs.

Blog Tags: 

Using Arrays and Array Functions in Microsoft Dynamics Business Central NAV

How To: Use Arrays and Array Functions in Microsoft Dynamics Business Central/NAV Image may be NSFW.
Clik here to view.
How to use Arrays and Array Functions in Dynamics Business Central or NAV

This blog discusses how to use arrays and array functions in Microsoft Dynamics 365/NAV.

What is an Array?

An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. Following are the important terms to understand the concept of an Array:

  • Element − Each item stored in an array is called an element.

  • Index − Each location of an element in an array has a numerical index, which is used to identify the element.

An array can be represented as a row of values:

23145671185100

Figure 1 – Representation of an Array

Syntax: Array [Dimension] of Type;

The Dimension defines the length of the array and type defines the data type of array.

There are number of array functions:

ARRAYLEN METHOD

COPYARRAY METHOD

COMPRESSARRAY METHOD

The ArrayLen Method

The ArrayLen method returns the total number of elements in an array or the number of elements in a specific dimension.

Syntax: Length:=ArrayLen(Array,[,Dimension])

  1. Create a CodeUnit.
    Image may be NSFW.
    Clik here to view.
    Figure 2 – Creating a CodeUnit

    Figure 2 – Creating a CodeUnit
  2. Declare the array and assign values to each element.
    Image may be NSFW.
    Clik here to view.
    Figure 3 – Declaring an array and assigning values

    Figure 3 – Declaring an array and assigning values
  3. Calculate the length of the array using the ArrayLen function.
  4. Assign a variable to store the length of the array.
    Image may be NSFW.
    Clik here to view.
    Figure 4 – Assigning array lengths into a variable

    Figure 4 – Assigning array lengths into a variable
  5. Display the length of the array using a message.
    Image may be NSFW.
    Clik here to view.
    Figure 5 – Displaying the array length in a message

    Figure 5 – Displaying the array length in a message
    Image may be NSFW.
    Clik here to view.
    Figure 6 – CodeUnit for displaying the length of an array

    Figure 6 – CodeUnit for displaying the length of an array
  6. Create the page extension using the tpageext snippet. Inside the action, specify the location. For this, you can use one of the following: addafter, addbefore, addlast, addfirst. Specify the name of action that should appear in BC/NAV. Inside the action, write the code to get triggered.
  7. Create a variable for the codeunit and specify the name. When the action is called, the trigger is activated.
    Image may be NSFW.
    Clik here to view.
    Figure 7 – PageExtension of the array

    Figure 7 – PageExtension of the array
    Image may be NSFW.
    Clik here to view.
    Figure 8 – Navigating to choose the option

    Figure 8 – Navigating to choose the option

The CopyArray Method

CopyArray is used to copy elements of one array to another.

Syntax: Copyarray:=CopyArray(Newname,ArrayName,Position[,Length]);

  1. Create a code unit as shown earlier or create another array for the copy array and another variable to store the copied array.
  2. Use the CopyArray function to copy the array. Inside the function, specify the name of the newly created array. Specify the name of the array to be copied, then specify the position of the elements—from where you want to start the copy. Finally, specify the length of the newly created array.
    Image may be NSFW.
    Clik here to view.
    Figure 9 – Creating a copy of an array with the CopyArray function

    Figure 9 – Creating a copy of an array with the CopyArray function
  3. To display the copied array, it needs to be displayed in a message. Use Message() for that and specify elements of newly created array.
    Image may be NSFW.
    Clik here to view.
    Figure 10 – Message to display a newly created array

    Figure 10 – Message to display a newly created array
  4. Create a page extension for the copied array.
    Image may be NSFW.
    Clik here to view.
    Figure 11 – Page extension for creating a copied array

    Figure 11 – Page extension for creating a copied array

The CompressArray Method

The CompressArray method moves all non-empty strings (text) in an array to the beginning of the array. The resulting String Array has the same number of elements as the input array, but empty entries appear at the end of the array.

Syntax: Count:= CompressArray(StringArray);

For the CompressArray, you also need to create a code unit as well as page extension, or you can use the previous code unit by declaring new necessary variables.

  1. Declare the array and variable. Use the CompressArray function to compress the array.
  2. In the CompressArray function, specify the array name to be compressed.
    Image may be NSFW.
    Clik here to view.
    Figure 12 – Using the CompressArray function

    Figure 12 – Using the CompressArray function
  3. After preparing the CompressArray Function, use Message() to display it.
    Image may be NSFW.
    Clik here to view.
    Figure 13 – Message to display CompressArray

    Figure 13 – Message to display CompressArray
    Image may be NSFW.
    Clik here to view.
    Figure 14 – CodeUnit to display CompressArray

    Figure 14 – CodeUnit to display CompressArray
  4. Create a page extension for this CompressArray as discussed earlier, or as shown below.
    Image may be NSFW.
    Clik here to view.
    Figure 15 – PageExtension to display CompressArray

    Figure 15 – PageExtension to display CompressArray

If you have any questions about this process, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

Blog Tags: 

Microsoft Dynamics Business Central AL Programming Basics: How to Use the Delete Statement

How To: Use the Delete statement in Microsoft Dynamics Business Central/NAV Image may be NSFW.
Clik here to view.
How To: Use the Delete statement in Microsoft Dynamics Business Central/NAV

This blog provides a step-by-step guide to using Delete statement in Microsoft Dynamics Business Central/NAV.

  1. Open Visual Studio.
  2. Create a Code unit for the Delete statement.
    Image may be NSFW.
    Clik here to view.
    Figure 1 – Creating a code unit for the Delete statement in Dynamics Business Central

    Figure 1 – Creating a code unit for the Delete statement in Dynamics Business Central
  3. Create a page extension.
    Image may be NSFW.
    Clik here to view.
    Figure 2 – Creating a page extension for the Delete statement in Dynamics Business Central

    Figure 2 – Creating a page extension for the Delete statement in Dynamics Business Central
  4. Click F5 or click on View, then Click on >AL: Publish.
    Image may be NSFW.
    Clik here to view.
    Figure 3 – Publishing the document in Dynamics Business Central

    Figure 3 – Publishing the document in Dynamics Business Central
  5. Delete the record. An example of the final output is shown in Figure 4.
    Image may be NSFW.
    Clik here to view.
    Figure 4 – Deleting the record from Dynamics Business Central

    Figure 4 – Deleting the record from Dynamics Business Central
    Image may be NSFW.
    Clik here to view.
    Figure 5 – Record deleted from Dynamics Business Central

    Figure 5 – Record deleted from Dynamics Business Central

If you have any questions about this function or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

 

Blog Tags: 

Using Triggers to Display Messages in Microsoft Dynamics Business Central

How To: Use Triggers to Display Messages 

Image may be NSFW.
Clik here to view.
How To: Use Triggers to Display Messages in Dynamics Business Central

Triggers are used in Microsoft Dynamics 365 Business Central for a variety of purposes, from validating input to controlling system behavior. This blog introduces using triggers by showing how they work with Tables and Fields.

In this blog, we will cover how to:

  • Create a Table
  • Create a Page for the table
  • Publish it to the cloud
  • Test whether our triggers are working

Using Triggers

Open Visual Studio and, after completing all the prerequisites (changes in app.json and launch.json and downloading the symbols required coding using the AL Language), create a page and then create a table in it as shown in Figure 1.

Image may be NSFW.
Clik here to view.
Figure 1 – Creating a Table with a Primary Key of “ID”

Figure 1 – Creating a Table with a Primary Key of “ID”

Image may be NSFW.
Clik here to view.
Figure 2 – Adding Triggers

Figure 2 – Adding Triggers

Below is a list of the triggers used in the example and when they are fired:

  • OnInsert(): When there is a new entry entered in the table
  • OnModify(): When there is any modification performed on a field of the table
  • OnDelete(): When any entity is deleted from the table
  • OnRename(): When the primary key of the table is changed

Image may be NSFW.
Clik here to view.
Figure 3 – An example of how to create a page and add a trigger inside a field

Figure 3 – An example of how to create a page and add a trigger inside a field

The trigger OnValidate() is helpful where we require a condition on the characters that can be entered in the field. In this example, we have required that the length of name in the field must be greater than three characters.

Once the page is created, publish it and move to the web client to see the trigger is working. Press F5 to publish it and a new window of the default browser opens.

Image may be NSFW.
Clik here to view.
Figure 4 – Use IntelliSense to search for the page created

Figure 4 – Use IntelliSense to search for the page created

Testing the OnInsert() Trigger

Using IntelliSense (using the shortcut Alt+Q), type the page name and press Enter.

Image may be NSFW.
Clik here to view.
Figure 5 – The Insert trigger is fired as soon as the "ID" is entered in the page

Figure 5 – The Insert trigger is fired as soon as the "ID" is entered in the page

Once the page name is inserted, the system indicates a new record was inserted. This is the initial message whenever a new entry is made on the page.

Testing the OnValidate() Trigger

If you try to enter a name that violates the length condition, you will receive an error.

Image may be NSFW.
Clik here to view.
Figure 6 – The condition for the "Name" field triggers an error

Figure 6 – The condition for the "Name" field triggers an error

The major difference between a Message and an Error is that Error won’t go away until and unless the condition is satisfied for that field.

Testing the OnModify() Trigger

Once everything is added in the table, the OnModify trigger is fired.

Image may be NSFW.
Clik here to view.
Figure 7 – Modifying a record fires the OnModify() trigger

Figure 7 – Modifying a record fires the OnModify() trigger

Testing the OnRename() Trigger

Now try to change the primary key of the entity in the table and see what all it gives you. The system will ask you to confirm whether you want to rename the primary key. If you select Yes, the OnRename() trigger is fired.

Image may be NSFW.
Clik here to view.
Figure 8 – The OnRename() trigger is fired when the Primary key is changed

Figure 8 – The OnRename() trigger is fired when the Primary key is changed

Testing the OnDelete() Trigger

Now observe what happens when you delete a record. When a record is deleted, the system fires the OnDelete() trigger.

Image may be NSFW.
Clik here to view.
Figure 9 – The OnDelete() trigger is fired when a record is deleted

Figure 9 – The OnDelete() trigger is fired when a record is deleted

If you have any questions about Extensions or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV/Business Central development, check out our collection of NAV and BC developer blogs.

Blog Tags: 

Customizing Microsoft Dynamics Business Central on Premises Using Tables and Table Types

How To: Customizing Microsoft Dynamics Business Central on Premises Using Tables and Table Types Image may be NSFW.
Clik here to view.
How To: Customize Microsoft Dynamics Business Central On Premises Using Tables and Table Types

In Microsoft Dynamics 365 Business Central, there is a table where customer information is stored. In addition, there is a table for vendor data, a table for item data, and so on. Tables let you organize and structure the data within your solution. There are different types of tables based on their technical implementation as well as their functional use.

Table types by technical implementation

  1. Database tables
  2. System tables
  3. Virtual tables
  4. Temporary tables.

Type 1: Database Tables

Most tables in the database are database tables. You will have read and write privileges on database tables.

Examples: Customer table, Vendor table, and Item table.

Image may be NSFW.
Clik here to view.
Figure 1 – Example for Database Table in Dynamics Business Central on Premises

Figure 1 – Example for Database Table in Dynamics Business Central on Premises

Type 2: System Tables

System tables are a special kind of table, because these tables and their data are necessary for the system to function. They are saved in the database and they will have object numbers above two million.

Examples: Profile table, Company table, and Permission table.

Image may be NSFW.
Clik here to view.
Figure 2 – Example for System Table n Dynamics Business Central on Premises

Figure 2 – Example for System Table n Dynamics Business Central on Premises

Type 3: Virtual Table

In this table the data is created at runtime, so it’s not stored in the database. As a developer will not have write privileges to virtual tables. The tables are read-only, therefore, information present in these tables cannot be changed. You cannot insert, modify, or delete information in virtual tables. You cannot view the virtual table or run it from table object designer. However, you can create a page with the source table view property as any virtual table name and run it.

Example: Active Session Table

Image may be NSFW.
Clik here to view.
Figure 3 – Example for Virtual Table n Dynamics Business Central on Premises

Figure 3 – Example for Virtual Table n Dynamics Business Central on Premises

Type 4: Temporary Table

A temporary table only exists in the memory of a client. It keeps an image or a copy of another database table. It has no data and it’s frequently used in posting routines and document reports.

Example: Item Journal

Image may be NSFW.
Clik here to view.
Figure 4 – Example for Temporary Table before posting n Dynamics Business Central on Premises

Figure 4 – Example for Temporary Table before posting n Dynamics Business Central on Premises

Image may be NSFW.
Clik here to view.
Figure 5 – Example for Temporary Table after posting in Dynamics Business Central on Premises; notice that the Document No. has been incremented and the Quantity has reset to zero

Figure 5 – Example for Temporary Table after posting in Dynamics Business Central on Premises; notice that the Document No. has been incremented and the Quantity has reset to zero

Table types by functional use

Type 1: Master tables

Master tables contain information about the most important entities of that module, the primary focus subjects of its functional area. For instance, if you don’t have an item table, you can’t do anything in sales. Similarly, if you don’t have a vendor table, then you can’t create the purchase order. These primary tables are referred to as Master Tables.

Examples: Vendor, Customer, and Item tables

Image may be NSFW.
Clik here to view.
Figure 6 – Example of the Vendor Master Table in Dynamics Business Central on Premises

Figure 6 – Example of the Vendor Master Table in Dynamics Business Central on Premises

Type 2: Supplemental Tables

Supplemental Tables are not as important as Master Tables, but they give extra information to the master data. You can store data related to countries, like country code and description, in supplemental tables.

Examples: Language and Currency tables

Image may be NSFW.
Clik here to view.
Figure 7 – Example of a Language Supplemental Table in Dynamics Business Central on Premises

Figure 7 – Example of a Language Supplemental Table in Dynamics Business Central on Premises

Type 3: Setup Tables

When you create a solution, you will probably need to store configuration information for a certain module. You can set up and organize the data using a Setup Table.

Example: Sales and Receivables Setup, G/L Setup

Image may be NSFW.
Clik here to view.
Figure 8 – Example of a Setup Table in Dynamics Business Central on Premises

Figure 8 – Example of a Setup Table in Dynamics Business Central on Premises

Type 4: Register tables

Register Tables function as a table of contents for its corresponding ledger tables. It registers historical or transactional types of information.

 Examples: Item Register tables, G/L Register

Image may be NSFW.
Clik here to view.
Figure 9 – Example of a Register Table in Dynamics Business Central on Premises

Figure 9 – Example of a Register Table in Dynamics Business Central on Premises

Type 5: Subsidiary Tables

These tables contain a combination of information from master and/or supplemental tables, like item/vendor information.

Examples: Item Vendor, FA Depreciation Book tables

Image may be NSFW.
Clik here to view.
Figure 10 – Example of a Subsidiary Table in Dynamics Business Central on Premises

Figure 10 – Example of a Subsidiary Table in Dynamics Business Central on Premises

Type 6: Ledger Tables

Ledger Tables let you find the transactional information of that functional domain. When you post the item journal, the item ledger entry will be created. When you post the cash or vendor payment journal, the general ledger entry will be created. It will hold your history information. After the transaction is completed, all the information will be in ledger table.

Examples: Customer Ledger Entry, Item Ledger Entry tables

Image may be NSFW.
Clik here to view.
Figure 11 – Example of a Ledger Table in Dynamics Business Central on Premises

Figure 11 – Example of a Ledger Table in Dynamics Business Central on Premises

Type 7: Journal Tables

All transactions are booked through journals, so it is the primary transactional entry. Journal Tables contain data to perform specific tasks. For example, the item journal is used to increase or decrease inventory with a negative and positive adjustment. When you post your transaction, the data is deleted from the table, so you don’t see the item journal line after posting. That is, they are used to perform certain tasks, and they hold data only until you post the information. Journal Tables usually have a specific name that ends with journal line, and they have specific type of primary key.

Examples: Purchase Journal, Item Journal tables

Image may be NSFW.
Clik here to view.
Figure 12 – Example for Journal Table in Dynamics Business Central on- Premises

Figure 12 – Example for Journal Table in Dynamics Business Central on- Premises

Type 8: Document Tables

When you perform certain transactions, you will need documents, for example, a sales quote and a sales order. Document Tables are secondary transactional tables. These tables are always built out of two tables—a table with the header information and a table with the line details. When the customer is placing an order, you want to store common information in the Sales Header, such as: When the order is created, when it’s placed, when it is ready to ship, and when it is delivered. The Sales Line holds information like, “What are the items we need?” or “What are the different prices we selling those contains in sales line?”

Example: Sales Header and Sales Lines—contain information like Sales Orders and Sales Quotes

Image may be NSFW.
Clik here to view.
Figure 13 – Example for Sales Header Table of Document Table in Dynamics Business Central on Premises

Figure 13 – Example for Sales Header Table of Document Table in Dynamics Business Central on Premises

Image may be NSFW.
Clik here to view.
Figure 14 – Example for Sales Line Table of Document Table in Dynamics Business Central on Premises

Figure 14 – Example for Sales Line Table of Document Table in Dynamics Business Central on Premises

Type 9: Document History Tables

The Document History Tables are the historical version of the document tables. When you post documents from the document tables, they will go through a journal table and end up in a document history table. That means when you create a sales order or a sales invoice,  it will move to the corresponding history table once you post it. It will also create ledger entries, but the details will be available in the document history table.

Examples: Sales Invoice Header and Sales Invoice Lines

Image may be NSFW.
Clik here to view.
Figure 15 – Example of the Sales Invoice Header of a Document History Table in Dynamics Business Central on Premises

Figure 15 – Example of the Sales Invoice Header of a Document History Table in Dynamics Business Central on Premises

Image may be NSFW.
Clik here to view.
Figure 16 – Example of the Sales Invoice Line of a Document History Table in Dynamics Business Central on Premises

Figure 16 – Example of the Sales Invoice Line of a Document History Table in Dynamics Business Central on Premises

If you have any questions about Tables and their uses in Microsoft Dynamics NAV or Business Central, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV/Business Central development, check out our collection of NAV and Business Central Development Blogs.

Blog Tags: 

Using Keyword STRPOS in Microsoft Dynamics NAV or Business Central

How To: Use Keyword STRPOS in Microsoft Dynamics NAV or Business Central Image may be NSFW.
Clik here to view.
How To: Use Keyword STRPOS in Microsoft Dynamics NAV or Business Central

In this blog, you will learn about a keyword used in Microsoft Dynamics NAV or Business Central programming called as the ‘STRPOS’. You will also learn how it can make programming in these applications easier.

About the Keyword “STRPOS” and How to Use It

“STRPOS” stands for “String Position.” It is used when you need to get the position of a word or a letter in a certain position in a string.

  1. Once the initial editing of the app.json and launch.json is completed, the next step is to create a file and then code inside the file, as shown in Figure 1.
    Image may be NSFW.
    Clik here to view.
    Figure 1 – Messages used with STRPOS keyword in Microsoft Dynamics NAV or Business Central

    Figure 1 – Messages used with STRPOS keyword in Microsoft Dynamics NAV or Business Central
    There are many things defined in Figure 1. Here is what they are used for:  

    mystring:='Hello i am paymax and i am here to help you. I am a bot and i am designed by a software designer,you can give me the commands to make me do a particular task. You are my Master';

    Message ('The string is %1',StrPos(mystring,'Master'));       

    This is the first message that we have provided.

    Outcome: - This message will provide us the position of the word ‘Master’ that is present in the string.

    mystring:='Hello i am paymax and i am here to help you. I am a bot and i am designed by a software designer,you can give me the commands to make me do a particular task. You are my Master';

    Message ('The string is %1',StrPos(mystring,'I'));

    So, what if I need to get the location of a word in the String?

    Outcome: - As we can see that there are a lot of places where ‘I’ is being used in this string, how does visual studio deals with it is it provides you the first occurring ‘I’ and displays its position.

    Message('The string is %1',StrPos(mystring,'Bo'));

    This particular one I did for a small learning that whenever we are giving the STRPOS so always remember that it is case sensitive, and it will check first weather the word we are searching for is available in the string.

    Outcome: - It will be delivering us with 0 as it is case sensitive, and we have defined an upper case for ‘Bo’, whereas in the MYstring we said it to be as ‘bo’.

    Message('the length of the string is %1',StrLen(mystring));

    This function is used for the knowing the exact length of our string that we have provided to the system.

    Output: - Always remember it also counts the spaces that we have mentioned in our main text Mystring so it will be giving us the full length of the Mystring including all the punctuation used by us.

    Message('The length of the string is %1',MaxStrLen(mystring));

    This function is used for the knowing the length that we have defined in the VAR section of the string, in respective of our string it will be greater.

    Output: - The Var section we have defined Text [50] so it will be giving us as 50 if our string is less than 50 or otherwise if our string is greater than the defined character so it will give us a different message.​
  2. After creating the code unit, create a page extension where the trigger calls all the messages that have been fired one by one.
    Image may be NSFW.
    Clik here to view.
    Figure 2 - The creation of the page extension is as in Microsoft Dynamics NAV or Business Central

    Figure 2 - The creation of the page extension is as in Microsoft Dynamics NAV or Business Central
  3. With the page extension ready, deploy it to the server and view the outcomes of the messages.
    Image may be NSFW.
    Clik here to view.
    Figure 3 - After the deployment of a page extension, the assigned button appears where indicated in Microsoft Dynamics NAV or Business Central

    Figure 3 - After the deployment of a page extension, the assigned button appears where indicated in Microsoft Dynamics NAV or Business Central
    Image may be NSFW.
    Clik here to view.
    Figure 4 - The first message pops out the length of the Word ‘Master’ in Microsoft Dynamics NAV or Business Central

    Figure 4 - The first message pops out the length of the Word ‘Master’ in Microsoft Dynamics NAV or Business Central​
    Image may be NSFW.
    Clik here to view.
    Figure 5 - As it is case sensitive, it searches for 'I' and then the position of 'I' is given by it in Microsoft Dynamics NAV or Business Central

    Figure 5 - As it is case sensitive, it searches for 'I' and then the position of 'I' is given by it in Microsoft Dynamics NAV or Business Central

    Image may be NSFW.
    Clik here to view.
    Figure 6 – The query was for 'Bo' and it is case-sensitive, so the system gives 0 as there is no occurrence of 'Bo' in Microsoft Dynamics NAV or Business Central

    Figure 6 – The query was for 'Bo' and it is case-sensitive, so the system gives 0 as there is no occurrence of 'Bo' in Microsoft Dynamics NAV or Business Central​
    Image may be NSFW.
    Clik here to view.
    Figure 7 - The total length of the String is given by the next message in Microsoft Dynamics NAV or Business Central

    Figure 7 - The total length of the String is given by the next message in Microsoft Dynamics NAV or Business Central

    Image may be NSFW.
    Clik here to view.
    Figure 8  - The Maximum length that we defined in the VAR section of the code is given here in the message in Microsoft Dynamics NAV or Business Central

    Figure 8  - The Maximum length that we defined in the VAR section of the code is given here in the message in Microsoft Dynamics NAV or Business Central​
    Image may be NSFW.
    Clik here to view.
    Figure 9 - An example if the VAR is defined with a less length than the string, generating a message in Microsoft Dynamics NAV or Business Central

    Figure 9 - An example if the VAR is defined with a less length than the string, generating a message in Microsoft Dynamics NAV or Business Central

If you have any questions about string position or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV/Business Central development, check out our collection of NAV or Business Central Development Blogs.

 

Blog Tags: 

Creating AL Snippets using Visual Studio Code for Dynamics 365 Business Central and NAV

How To: Create AL Snippets Using Visual Studio Code for Microsoft Dynamics 365 Business Central and NAV Image may be NSFW.
Clik here to view.
How to create AL Code snippets using Visual Studio Code

AL snippets make programming in Microsoft Dynamics Business Central or Dynamics NAV easy. Let's dig in.

What are AL Snippets, and what do they look like?

AL Snippets are pieces of AL code or small templates that can be recycled and reused for faster coding in Visual Studio code. They have the prefix “t”, followed by a meaningful name, like taction, tfield, ttrigger, etc.

Standard snippets

Dynamics NAV/BC provides a number of standard, pre-defined snippets. This standard snippet list is divided into 4 categories, as shown in Figure 1:

Image may be NSFW.
Clik here to view.
Figure 1 – List of standard, pre-defined AL snippets in Microsoft Dynamics Business Central or NAV

Figure 1 – List of standard, pre-defined AL snippets in Microsoft Dynamics Business Central or NAV

How to create an AL snippet

You can create AL snippets to fit your requirements using Visual Studio. To accomplish this task, there is a file AL.json (AL) where user-defined snippets are stored. Open the file using one of the 2 methods:  

  • Choose these Options: Go to File |Preferences | User Snippets.
  • Choose these Options: Run Command Pallette (Ctrl + Shift + P) and select Preferences: Configure User Snippets.

 When you open AL.json file for the very first time, it will contain the commented piece of code as shown in Figure 2.

Image may be NSFW.
Clik here to view.
Figure 2 -  AL.json file opened for the first time, with a commented piece of code

Figure 2 -  AL.json file opened for the first time, with a commented piece of code

The code in Figure 2 provides a pretty clear picture of how to create snippets of your own. Now, let's start by creating our own AL Snippet and try using the User Defined Snippets while coding in AL files by following the below steps:

  1. Replace the predefined code in the AL.json file to the code shown in Figure 3. This code snippet will be added to the application as a message statement.
    Image may be NSFW.
    Clik here to view.
    Figure 3 – Replacing the pre-defined code in the AL.json file with new code

    Figure 3 – Replacing the pre-defined code in the AL.json file with new code
  2. Go to the HelloWorld.al file or whatever file you want to insert a message.
    Image may be NSFW.
    Clik here to view.
    Figure 4 – HelloWorld.al file

    Figure 4 – HelloWorld.al file
  3. In the new line, press “t”. This will activate Intellisense and show you the series of snippets, including the one you just created. Choose tMessage from the list, and it will add the message line with the cursor ready to accept the name of the field you want to add to the displayed message.
  4. As soon as you select the field and press tab, this will complete the line and move to the next line. Now, repeat the steps again and add as many messages as you can for the other fields as well. You will see the code something like the one in Figure 5.
    Image may be NSFW.
    Clik here to view.
    Figure 5 – Messages added for fields

    Figure 5 – Messages added for fields

The AL snippet you have created will Write the code for the Messages. Similarly, you can define as many user-defined snippets as you like for other functions.

  1. After completing the code, Create the package (Ctrl + Shift + B), publish and install it (F5), and check your results while opening the Customer List.

If you have any questions about report building or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV/Business Central development, check out our collection of NAV or Business Central Development Blogs.

 

Blog Tags: 

How To Add Report Filters in Dynamics Business Central or NAV

How To: Add Filters in a Report in Microsoft Dynamics 365 Business Central or Dynamics NAV Image may be NSFW.
Clik here to view.
How to add report filters in Dynamics Business Central or NAV

This blog provides step-by-step instructions on how to add filters in a report in Microsoft Dynamics 365 Business Central or Dynamics NAV. In the example provided, if you want to be able to view only blocked customers, adding a filter in a report will allow you to so.

  1. Create a window in which you can select the desired fields, similar to Figure 1.
    Image may be NSFW.
    Clik here to view.
    Figure 1 – The field filter in a report in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Figure 1 – The field filter in a report in Microsoft Dynamics 365 Business Central or Dynamics NAV

    In this example, the area added for the field filters includes a filter for “No.” and for “Status”.
  2. Make a page extension to extend the reach for the desired filters for the Customer List.
    Image may be NSFW.
    Clik here to view.
    Figure 2 – The page extension for the Customer List in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Figure 2 – The page extension for the Customer List in Microsoft Dynamics 365 Business Central or Dynamics NAV
  3. Reveal the file in the explorer.
    Image may be NSFW.
    Clik here to view.
    Figure 3 – Revealing the file in the explorer in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Figure 3 – Revealing the file in the explorer in Microsoft Dynamics 365 Business Central or Dynamics NAV
  4. Open the report in the report builder to view what it looks like.
    Image may be NSFW.
    Clik here to view.
    Figure 4 - Opening the report in the report builder in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Figure 4 - Opening the report in the report builder in Microsoft Dynamics 365 Business Central or Dynamics NAV
    Image may be NSFW.
    Clik here to view.
    Figure 5 – The report builder displaying that the report is ready in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Figure 5 – The report builder displaying that the report is ready in Microsoft Dynamics 365 Business Central or Dynamics NAV​
  5. Once the report is ready, save it and publish the file using the shortcut “F5”.
    Image may be NSFW.
    Clik here to view.
    Figure 6 – Publishing the report in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Figure 6 – Publishing the report in Microsoft Dynamics 365 Business Central or Dynamics NAV
  6. Move to the button where the filter was placed.
    Image may be NSFW.
    Clik here to view.
    Figure 7 – The extension as created in the report builder in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Figure 7 – The extension as created in the report builder in Microsoft Dynamics 365 Business Central or Dynamics NAV​

    Figure 8 shows the filter window that asks about the various filters that can be applied the report is printed.
    Image may be NSFW.
    Clik here to view.
    Figure 8 – The filter window in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Figure 8 – The filter window in Microsoft Dynamics 365 Business Central or Dynamics NAV​
  7. Apply the filters. Since this example uses the Cronus database, some customers are also being blocked.
    Image may be NSFW.
    Clik here to view.
    Figure 9 – Keeping the blocked field in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Figure 9 – Keeping the blocked field in Microsoft Dynamics 365 Business Central or Dynamics NAV

Figure 10 shows an example of a customer with the filters “Blocked”>> “Ship” is Progressive Home Furnishings. The customer Elkhorn Airport also has these filters.

Image may be NSFW.
Clik here to view.
Figure 10 – Customer within Microsoft Dynamics 365 Business Central or Dynamics NAV

Figure 10 – Customer record within Microsoft Dynamics 365 Business Central or Dynamics NAV

Figure 11 shows what the printed report looks like:

Image may be NSFW.
Clik here to view.
Figure 11 – Report with Customer Status = "Ship" in Microsoft Dynamics 365 Business Central or Dynamics NAV

Figure 11 – Report with Customer Status = "Ship" in Microsoft Dynamics 365 Business Central or Dynamics NAV

 

If you have any questions about report building or other Dynamics 365 Business Central or NAV questions for any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics 365 Business Central or NAV.

If you are interested in NAV or 365 Business Central development, check out our collection of NAV and Business Central Development Blogs.

Blog Tags: 

Dynamics 365 Business Central AL Development

AL Development in Microsoft Dynamics 365 Business Central: A Series by a Microsoft MVP 

Image may be NSFW.
Clik here to view.
How to use AL to develop in Microsoft Dynamics 365 Business Central

In this series, Microsoft MVP Saurav Dhyani provides everything you need to know about developing in Business Central. Using VS Code to create an Extension, Saurav provides the modification requirements that include all object types and base object changes.

Saurav also provides instructions for all the pre-requisites to complete the task of creating an Extension. You’ll download, install, and connect Business Central on premises to VS Code.

In the first article, he reviews the customer requirements.

First, he will walk you through how to create a new table in the database. You might also want to reference Customizing Microsoft Dynamics Business Central Using Tables and Table Types for more information on this step.

Next, you will create a new page in the database based on the previously defined customer requirements.

After that, you will need to customize the base pages, adding fields in the created pages, allowing the users to access the fields.

Following these steps, it’s time to publish your Extension.

Now, you will need to develop the subscriber Codeunits. Pay attention to these steps, as this is not a codeunit extension.

Then you will add additional Subscriber Codeunits. This step includes adding new files, identifying a published Event, and assigning parameters.

Your Extension will subsequently need to be republished and tested.

Finally, you’ll want to create a report in AL to complete the stated customer requirements.

And last but not least, you’ll want to review everything learned in this series with the Summary of the AL Development series of blogs by Saurav Dhyani.

Thanks to Saurav for sharing his knowledge in AL development for Dynamics 365 Business Central!

If you have questions about the capabilities of Dynamics NAV or Business Central, contact ArcherPoint.

Blog Tags: 

Working with Multiple AL Projects in One Workspace Using Visual Studio Code in Microsoft Dynamics Business Central On Premises

How To: Work with Multiple AL Projects in One Workspace Using Visual Studio Code in Microsoft Dynamics Business Central On Premises Image may be NSFW.
Clik here to view.
How to work with multiple AL projects in one workspace using Visual Studio Code

If you’re new to Microsoft Dynamics Business Central on premises, you need to know how to easily customize it. In this blog, you’ll learn how you can work with multiple AL projects in one Visual Studio Code editor in Microsoft Dynamics Business Central on premises.

  1. Create a new AL extension using view -> Command palette – AL:Go or using the keyboard shortcut -> Ctrl+Shift+P -> AL Go
    Image may be NSFW.
    Clik here to view.
    Figure 1 – Creating a new extension in Dynamics Business Central on premises

    Figure 1 – Creating a new extension in Dynamics Business Central on premises
  2. Create the first extension with the path. In the example in Figure 2, the extension name is AL Workspace
    Image may be NSFW.
    Clik here to view.
    Figure 2 – Creating a new extension with path and extension name in Dynamics Business Central on premises

    Figure 2 – Creating a new extension with path and extension name in Dynamics Business Central on premises
    Next, some basic configuration settings in Launch. json file need to be done.
    Image may be NSFW.
    Clik here to view.
    Figure 3 – Configuration settings for Launch. json file in Dynamics Business Central on premises

    Figure 3 – Configuration settings for Launch. json file in Dynamics Business Central on premises
    Note: In this app. json file, there is no need to change anything/ You can change the publisher name or just leave it as is.
    Image may be NSFW.
    Clik here to view.
    Figure 4 – Configuration settings for app. json file in Dynamics Business Central on premises

    Figure 4 – Configuration settings for app. json file in Dynamics Business Central on premises
    In Figure 5, the HelloWorld.ai file shows an error because it does know what “customer list” means, so you need to download the symbols.
    Image may be NSFW.
    Clik here to view.
    Figure 5 – HelloWorld.al file in Dynamics Business Central on premises

    Figure 5 – HelloWorld.al file in Dynamics Business Central on premises
  3. To download symbols, use view ->command palette ->AL: Download symbols or use the keyboard shortcut Ctrl+Shift+P ->AL: Download symbols
    Image may be NSFW.
    Clik here to view.
    Figure 6 – Downloading Symbols for the HelloWorld.al file in Dynamics Business Central on premises

    Figure 6 – Downloading Symbols for the HelloWorld.al file in Dynamics Business Central on premises
    In Figure 7, you can see that there are no errors in “customer list”, and you get the notification that all reference symbols have been downloaded. On the left side of the screen, you have an .alpackages folder with two app files.
    Image may be NSFW.
    Clik here to view.
    Figure 7 – Symbols are downloaded and .al packages folder in Dynamics Business Central on premises

    Figure 7 – Symbols are downloaded and .alpackages folder in Dynamics Business Central on premises
  4. Create a second extension using the same steps, but with the path and name AL Workspace 2, as shown in Figure 8.
    Image may be NSFW.
    Clik here to view.
    Figure 8 – Creating a new extension with file name and extension name in Dynamics Business Central on premises

    Figure 8 – Creating a new extension with file name and extension name in Dynamics Business Central on premises
    Once the configuration settings in launch. json and app. json files (the same as AL Workspace1) are complete, you get the HelloWorld.Al file with errors in “customer list”.
    Image may be NSFW.
    Clik here to view.
    Figure 9 – HelloWorld.al file in AL workspace2 in Dynamics Business Central on premises

    Figure 9 – HelloWorld.al file in AL workspace2 in Dynamics Business Central on premises
  5. To add the first project, the AL Workspace1 needs to be in the same editor (AL Workspace2). Do this by adding the folder to workspace. The workspace is just a combination of multiple AL projects in one file.
    Image may be NSFW.
    Clik here to view.
    Figure 10 – Adding the AL Workspace1 folder to AL workspace2 in Dynamics Business Central on premises

    Figure 10 – Adding the AL Workspace1 folder to AL workspace2 in Dynamics Business Central on premises
  6. Select AL Workspace1, and you will see that you have AL workspace2 and AL workspace 1, as shown in Figure 11.
    Image may be NSFW.
    Clik here to view.
    Figure 11 – AL workspace1 added to AL workspace2 in Dynamics Business Central on premises

    Figure 11 – AL workspace1 added to AL workspace2 in Dynamics Business Central on premises
    The symbols are still missing because in AL Workspace2, “customer list” is not defined. But in AL Workspace1, it knows what “customer list” means because the symbols in the AL packages folder have been downloaded.
    Image may be NSFW.
    Clik here to view.
    Figure 12 – AL workspace1 added in AL workspace2 with symbols still missing in Dynamics Business Central on premises

    Figure 12 – AL workspace1 added in AL workspace2 with symbols still missing in Dynamics Business Central on premises
  7. Save the workspace.
    Image may be NSFW.
    Clik here to view.
    Figure 13 – Saving the workspace to the desktop in Dynamics Business Central on premises

    Figure 13 – Saving the workspace to the desktop in Dynamics Business Central on premises
  8. In Figure 14, you can see it, entitled workspace. Save this workspace to the desktop: Save file, save workspace as. In this example, it is saved as My Ext.
    Image may be NSFW.
    Clik here to view.
    Figure14 –  Workspace is saved on the desktop with workspace name My Ext in Dynamics Business Central on premises

    Figure14 –  Workspace is saved on the desktop with workspace name My Ext in Dynamics Business Central on premises
    If you go to Windows file Explorer, you can see that in the “Desktop” folder, there is a file with extension code “workspace”.
    Image may be NSFW.
    Clik here to view.
    Figure 15 – Workspace is saved with extension “workspace” in Dynamics Business Central on premises

    Figure 15 – Workspace is saved with extension “workspace” in Dynamics Business Central on premises
  9. You now have a workspace with two projects, AL workspace1 and AL workspace 2. To share the symbols in AL workspace1 with AL workspace2. create a folder by clicking Add Folder to Workspace and Ref.symbol.
    Image may be NSFW.
    Clik here to view.
    Figure 16 – Adding a new folder in the workspace in Dynamics Business Central on premises

    Figure 16 – Adding a new folder in the workspace in Dynamics Business Central on premises
    Image may be NSFW.
    Clik here to view.
    Figure 17 – Trying to add a new folder to the workspace in Dynamics Business Central on premises

    Figure 17 – Trying to add a new folder to the workspace in Dynamics Business Central on premises
    Image may be NSFW.
    Clik here to view.
    Figure 18 – New folder is added in the workspace in Dynamics Business Central on premises

    Figure 18 – New folder is added in the workspace in Dynamics Business Central on premises
  10. Add this folder to the workspace. You now have three folders: AL workspace1, AL workspace2, and the folder Ref.Symbol.
    Image may be NSFW.
    Clik here to view.
    Figure 19 – Total of three folders in the workspace in Dynamics Business Central on premises

    Figure 19 – Total of three folders in the workspace in Dynamics Business Central on premises
  11. Copy the .alpackages folder in AL Workspace1.
    Image may be NSFW.
    Clik here to view.
    Figure 20 – Copying the .alpackages folder in AL workspace1 in Dynamics Business Central on premises

    Figure 20 – Copying the .alpackages folder in AL workspace1 in Dynamics Business Central on premises
  12. After copying, the next step is to paste it in Ref.Symbol folder and then remove it from AL workspace1, as shown in Figure 22. When you restart Visual Studio Code, you can see that in this case, your Visual Studio Code is completely launched, your AL Workspace2 doesn't know anything about “customer list”, but the same is true for your AL workspace1. It doesn't recognize “customer list” anymore. This is because now the package, AL package, is in the folder Ref.symbol, so it doesn't know where to find them.
  13. Use this shortcut to address this. Go to the settings. There are three types of settings: the default settings, the user settings, the workspace settings, and the folder settings. If you go to the default settings and scroll down, you can see that there's a setting for pretty much every file extension, including the AL language extension. In there, there's a setting called AL package cache path, which has a reference to the AL packages folder.  This is by default.  Go to the root, then to the folder Ref.symbol, and indicate your package cache is in the folder AL packages, as shown in Figure 21.
    Image may be NSFW.
    Clik here to view.
    Figure 21 – Selecting .alpackages in Ref.Symbol folder in Dynamics Business Central on premises

    Figure 21 – Selecting .alpackages in Ref.Symbol folder in Dynamics Business Central on premises
    Image may be NSFW.
    Clik here to view.
    Figure 22 – Setting information for adding the .alpackages path in Dynamics Business Central on premises

    Figure 22 – Setting information for adding the .alpackages path in Dynamics Business Central on premises
  14. Save, close, and open Visual Studio Code again. Now, open the Workspace (My Ext), as shown in Figure 23.
    Image may be NSFW.
    Clik here to view.
    Figure 23 – Opening the workspace in Dynamics Business Central on premises

    Figure 23 – Opening the workspace in Dynamics Business Central on premises
  15. Wait a couple of seconds, and now your Visual Studio Code knows what “customer list” is in AL workspace2 and knows what “customer list” is in AL workspace1. So, now, your packages are shared across two projects.
    Image may be NSFW.
    Clik here to view.
    Figure 24 – Result for multiple AL projects in one workspace in Dynamics Business Central on premises

    Figure 24 – Result for multiple AL projects in one workspace in Dynamics Business Central on premises

 

If you have any questions about Dynamics NAV or Business Central for any topic and any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV/Business Central development, check out our collection of Development Blogs.

Blog Tags: 

Working with Custom Report Layouts in Microsoft Dynamics Business Central or NAV

How To: Moon Power Make-Up - Working with Custom Report Layouts in Microsoft Dynamics Business Central or NAV 

Image may be NSFW.
Clik here to view.
How to create custom report layouts in Microsoft Dynamics NAV or Business Central

When we do Microsoft Dynamics Business Central or Dynamics NAV development, one of our goals is to minimize the work required during an upgrade. When it comes to report customizations, we can handle this by using a custom report layout instead of modifying an existing report. It’s easier to upgrade, and it’s not any harder than modifying the existing report layout. I’ll talk you through custom report layout limitations, how you can make a custom report layout, and why you would want one.

The first thing to know is that custom report layouts are only a feature in NAV 2015 and later and in Business Central. Older versions of NAV cannot use a custom report layout. The entire feature rests on the SQL Server Reporting Services engine used to handle reporting in modern versions of NAV.

The second thing to know is that custom report layouts have a major limitation: If you need to add a field to a report that is not already in the dataset for the report, and the field cannot be calculated from data that’s already in the dataset for the report, you will not be able to use a custom report layout. If you have to add a field, you’ll need to modify the report object itself. Custom report layouts work because SQL Server Reporting Services separates the underlying data of a report from the presentation layer of a report (a.k.a., the layout). The entire idea of a custom report layout is that you’re giving an existing set of data a different presentation layer to work with – sort of like having the data put on different clothes to go on a date than it would to paint a house.

If your desired report change passes those two tests, then congratulations! You can use a custom report layout to meet your needs. Otherwise, you should probably make a modification to the report object itself.

To start with, you’ll need to open up NAV and look in Departments – Administration – IT Administration – Reports. The two things you’ll need here are Report Layout Selection and Custom Report Layouts.

Image may be NSFW.
Clik here to view.
Figure 1 - Report Layout Selection and Custom Report Layouts under Departments – Administration – IT Administration – Reports in Microsoft Dynamics Business Central/NAV

Figure 1 - Report Layout Selection and Custom Report Layouts under Departments – Administration – IT Administration – Reports in Microsoft Dynamics Business Central/NAV

These two features are key to using custom report layouts. Both are intertwined, and they work together to get you the layout customization you need. Let’s talk about what they do and when you use each of them.

The Report Layout Selection page shows you all of the NAV reports, and it allows you to choose the layout you’ll be using. The Custom Report Layouts page will show you all of the custom layouts that have been created for a report. You can press the Custom Layouts button from the Report Layout Selection screen to see all the available custom layouts for a specific report. You can also go straight to the Custom Report Layouts page to change an existing layout or to create a new one.

One report can have multiple layouts, and all of the layouts for every report live in the Custom Report Layout table. Layouts can be created in RDLC or in Word. What’s the difference? An RDLC layout is created and edited using SQL Server Report Designer, while a Word layout is edited using Word.

I’ve heard that the goal of Word layouts is to let less-technical users make changes to a report layout, while the RDLC reports are intended for power users and developers. Personally, I find the Word layouts to be nearly inscrutable and harder to modify than the RDLC layouts. However, I am a developer, and I often find “user friendly” tools to be frustratingly limited if I know a more complex tool well, so your mileage may vary. (I find that XMLports are much easier to create than RapidStart packages, also.)

Let’s walk through an example and see if we can’t add a new RDLC custom layout for sales orders, then modify it by changing some fields, and then set it up as the new layout for the sales order.

First, go to the Report Selection – Sales page and find out which report you’re using for Sales Orders. In the CRONUS company in NAV 2018, that’s report 1305 Sales – Confirmation. The base report looks like that shown in Figure 2.

Image may be NSFW.
Clik here to view.
Figure 2 – 1305 Sales Confirmation report in the CRONUS company in Microsoft Dynamics NAV 2018

Figure 2 – 1305 Sales – Confirmation report in the CRONUS company in Microsoft Dynamics NAV 2018

Let’s say that you want to modify the Sales – Confirmation report so that, in addition to the customer address and the company address, it also includes the customer’s shipping address as found in the Ship-to Address fields on the Sales Header. And while we’re in there, let’s fix that weird problem where the “Amount Subject to Sales Tax” and “Amount Exempt from Sales Tax” labels that should be in the report footer are appearing with the report lines instead.

  1. Go to the Custom Report Layouts page and make a new RDLC custom layout. On the page, select New, and the window in Figure 3 appears.
    Image may be NSFW.
    Clik here to view.
    Figure 3 – Window that appears after creating a new RDLC custom layout in Microsoft Dynamics Business Central/NAV

    Figure 3 – Window that appears after creating a new RDLC custom layout in Microsoft Dynamics Business Central/NAV
  2. Fill in the Report ID with the object ID of the report you’re modifying, which is 1305.
  3. Check the “Insert RDLC Layout” box and click OK to create a new Custom Report Layout that’s a copy of the built-in layout. In the Custom Report Layouts page, your new layout should look like Figure 4.
    Image may be NSFW.
    Clik here to view.
    Figure 4 – New custom report layout in Microsoft Dynamics Business Central/NAV

    Figure 4 – New custom report layout in Microsoft Dynamics Business Central/NAV
  4. Rename your custom layout to something you’ll remember, like “Ship Address and Footer Fix”.
  5. Highlight it and press the “Export Layout” button to make an RDLC layout to work with.
  6. Save the layout to your local machine when prompted.
  7. Find the RDLC file you saved and open it up with SQL Server Report Builder. It should look like Figure 5.
    Image may be NSFW.
    Clik here to view.
    Figure 5 - Saved RDLC file, opened in the SQL Server Report Builder

    Figure 5 - Saved RDLC file, opened in the SQL Server Report Builder
  8. Move the sales tax labels and amounts down and add the shipping address fields into the header. This is just like modifying an existing NAV report, so I’m not going to go into the details. When you’re done, it should look like Figure 6:
    Image may be NSFW.
    Clik here to view.
    Figure 6 – Report modified with the sales tax labels and amounts moved down and the shipping address fields added into the header

    Figure 6 – Report modified with the sales tax labels and amounts moved down and the shipping address fields added into the header
  9. Once you’ve made the necessary modifications, save the RDLC file and close out of the SQL Server Report Builder. Take note of where you’ve saved the RDLC file, since you’ll need it in a minute.
  10. Go back to NAV, find the Custom Report Layouts page, and select your newly-created record for the Sales – Confirmation report.
  11. Press the “Import Layout” button as shown in Figure 7, and then choose your custom RDLC file to be imported into NAV. NOTE: When you press the “Import Layout” button and choose a RDLC layout, you will not receive any confirmation message that the import was successful.
    Image may be NSFW.
    Clik here to view.
    Figure 7 – Import Layout button in the Custom Reports Layout page in Microsoft Dynamics Business Central/NAV

    Figure 7 – Import Layout button in the Custom Reports Layout page in Microsoft Dynamics Business Central/NAV
  12. With the custom layout imported, go to the Report Layout Selection screen and find report 1305 Sales – Confirmation. Change the “Selected Layout” value to “Custom Layout”, and then select your newly-created layout from the Custom Report Layouts screen that appears.
    Image may be NSFW.
    Clik here to view.
    Figure 8 – Report Layout Selection, “from Layout” selected in Microsoft Dynamics Business Central/NAV

    Figure 8 – Report Layout Selection, “from Layout” selected in Microsoft Dynamics Business Central/NAV

That should be all you need to do to get your new layout loaded. Be aware that in some versions of NAV prior to 2018, I have seen issues where the Custom Report Layout or Report Layout Selection records needed to be created by directly accessing the appropriate table from the Object Designer instead of using a page. If that is the case, you will still need to visit the Custom Report Layouts page and run “Import Layout” to get your layout into the system.

  1. With the layout imported, it’s time to verify that the results look good. Go to the Sales Order and press the “Print Confirmation” button, and your printed results should look like Figure 9.
    Image may be NSFW.
    Clik here to view.
    Figure 9 – New report layout in Microsoft Dynamics Business Central/NAV

    Figure 9 – New report layout in Microsoft Dynamics Business Central/NAV

 

You can see that there is a shipping address now and that the sales tax amount fields have been moved down into the footer section of the report.

Hopefully this blog entry has shown you something new about making a customized report layout. Just remember that it only works when you want to add or move fields that are already in the report dataset; if you need to add a new field that isn’t in the dataset being exported for the report, you’ll need to do that with an actual customization to the report. Thanks for reading!

NERDY STUFF UPDATE: If you’ve read other blog entries I’ve done, you know that I write stuff at the end about nerdy things I’m doing outside of work. I used to write about Street Fighter a lot, but I’ve mostly retired from fighting games, and now I play Magic cards instead. Many people consulted about this change have confirmed that this is a lateral move that has conferred minimal additional social status on me, and I may, in fact, be spending money on literal cardboard that will severely depreciate in value. These people are probably on to something, but I am having fun, and I do enjoy having fun.

If you have any questions about reports or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV/Business Central development, check out our collection of Business Central and NAV Development Blogs.

     

    Blog Tags: 

    Multi-Company Functionality in Microsoft Dynamics Business Central or NAV Consolidations

    How To: Setup Consolidations in Microsoft Dynamics Business Central or NAV Image may be NSFW.
    Clik here to view.
    How to setup and use consolidated companies in Microsoft Dynamics 365 Business Central or Dynamics NAV

    Consolidations can be performed:

    • Across different charts of accounts
    • With companies with different fiscal years
    • Using either the full amount or a specified percentage of a particular company’s financial information
    • With companies with different currencies
    • Using different methods of translating individual G/L accounts

    Companies that can be consolidated:

    • In the same database as the consolidated company
    • In other Microsoft Dynamics Business Central/NAV databases
    • In other accounting and business management programs (assuming that the data from the other programs can be exported to a file with the appropriate format)
    • In XML format

    Setting up the Consolidation

    Before performing a consolidation, the consolidated company must be set up. This company is set up the same way that other companies are set up, with its own chart of accounts and, if used, dimensions.

    1. Create a new company. In the example in Figure 2, the name of the company is “Cronus Consolidation”.
      Image may be NSFW.
      Clik here to view.
      Figure 1 – Creating a new company in Microsoft Dynamics Business Central/NAV

      Figure 1 – Creating a new company in Microsoft Dynamics Business Central/NAV
      Image may be NSFW.
      Clik here to view.
      Figure 2 – A new company set up in Microsoft Dynamics Business Central/NAV

      Figure 2 – A new company set up in Microsoft Dynamics Business Central/NAV
    2. Set up consolidation information on Chart of Accounts:
      • Export the chart of accounts from all the business units into Excel.
      • Compare the No. and Name.
      • All unique numbers in the chart of accounts from all business unit should be in the chart of accounts of the consolidated company.
      • Import the Excel file into the consolidated company, as shown in Figure 3.
        Image may be NSFW.
        Clik here to view.
        Figure 3 – Importing an Excel file into a consolidated company in Microsoft Dynamics Business Central/NAV

        Figure 3 – Importing an Excel file into a consolidated company in Microsoft Dynamics Business Central/NAV
    3. Set up the Intercompany Chart of Accounts (IC Chart of Accounts). Note: It is used to map the GL No to GL Acc. No.
      • Export the chart of account from the consolidated company into Excel.
      • Map the No. and Map-to G/L Acc. No., as shown in Figure 4.
      • Import the Excel file into the Intercompany chart of accounts.
        Image may be NSFW.
        Clik here to view.
        Figure 4 – Mapping the No. and Map-to G/L Acc. No. in the Intercompany chart of accounts in Microsoft Dynamics Business Central/NAV

        Figure 4 – Mapping the No. and Map-to G/L Acc. No. in the Intercompany chart of accounts in Microsoft Dynamics Business Central/NAV
    4. Set up Business Units in the consolidated company for all the individual business units, as shown in Figures 5 and 6.
      Image may be NSFW.
      Clik here to view.
      Figure 5 – Setting up a new business unit in the consolidated company in Microsoft Dynamics Business Central/NAV

      Image may be NSFW.
      Clik here to view.
      Figure 6 – Filling in the fields to set up a new business unit in the consolidated company in Microsoft Dynamics Business Central/NAV

      Figure 6 – Filling in the fields to set up a new business unit in the consolidated company in Microsoft Dynamics Business Central/NAV

    In this example, business units are to be consolidated 100%, which is specified on the Consolidation % field.
    Image may be NSFW.
    Clik here to view.
    Figure 7 – Business units are consolidated 100%, specified in the Consolidation % field in Microsoft Dynamics Business Central/NAV

    Figure 7 – Business units are consolidated 100%, specified in the Consolidation % field in Microsoft Dynamics Business Central/NAV

    Registering a Transaction in the Consolidated Company

    In the consolidated company, no transaction is created and posted. The consolidated company is only used for pulling the data from original companies. The following explains how a transaction is completed so you can see how the system behaves.

    1. Create the General Journal in the original company, i.e. CRONUS Mexico S.A.
      Image may be NSFW.
      Clik here to view.
      Figure 8 – Creating a General Journal in Microsoft Dynamics Business Central/NAV

      Figure 8 – Creating a General Journal in Microsoft Dynamics Business Central/NAV
    2. Post the General Journal.
      Image may be NSFW.
      Clik here to view.
      Figure 9 – Posting the General Journal in Microsoft Dynamics Business Central/NAV

      Figure 9 – Posting the General Journal in Microsoft Dynamics Business Central/NAV
    3. Check the General Ledger Entries in CRONUS Mexico S.A.
      Image may be NSFW.
      Clik here to view.
      Figure 10 – Checking the General Ledger entries in Microsoft Dynamics Business Central/NAV

      Figure 10 – Checking the General Ledger entries in Microsoft Dynamics Business Central/NAV
    4. Set up the Accounting Period in the consolidated company.
      Image may be NSFW.
      Clik here to view.
      Figure 11 – Setting up the accounting period in the consolidated company in Microsoft Dynamics Business Central/NAV

      Figure 11 – Setting up the accounting period in the consolidated company in Microsoft Dynamics Business Central/NAV
    5. Open the Business Unit “CRONUS Mexico S.A.” in Consolidated company.
      Image may be NSFW.
      Clik here to view.
      Figure 12 – Opening a business unit in a consolidated company in Microsoft Dynamics Business Central/NAV
    6. Perform the Run Consolidation operation in the consolidated company to update the Chart of Accounts. Note: If you do not perform the Run Consolidation operation, the Chart of Accounts will not get updated in the consolidated company.
      Image may be NSFW.
      Clik here to view.
      Figure 13 – Running Consolidation in a consolidated company to update the Chart of Accounts in Microsoft Dynamics Business Central/NAV

      Figure 13 – Running Consolidation in a consolidated company to update the Chart of Accounts in Microsoft Dynamics Business Central/NAV
    7. Click → Preview.
      Image may be NSFW.
      Clik here to view.
      Figure 14 – Previewing a consolidation in Microsoft Dynamics Business Central/NAV

      Figure 14 – Previewing a consolidation in Microsoft Dynamics Business Central/NAV
      Image may be NSFW.
      Clik here to view.
      Figure 15 – Consolidated Trial Balance in a consolidated company in Microsoft Dynamics Business Central/NAV

      Figure 15 – Consolidated Trial Balance in a consolidated company in Microsoft Dynamics Business Central/NAV
    8. Check the Chart of Accounts.
      Image may be NSFW.
      Clik here to view.
      Figure 16 – Checking the Chart of Accounts in a consolidated company in Microsoft Dynamics Business Central/NAV

      Figure 16 – Checking the Chart of Accounts in a consolidated company in Microsoft Dynamics Business Central/NAV

     

    If you have any questions about consolidations in Dynamics NAV or Business Central for any version, contact ArcherPoint.

    Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

    If you are interested in NAV/Business Central development, check out our collection of Business Central and NAV Development Blogs.

      Blog Tags: 

      Creating a List Report in Microsoft Dynamics NAV or Business Central On Premises

      How To: Create a Simple List Report in Microsoft Dynamics Business Central On Premises or Dynamics NAV 

      Image may be NSFW.
      Clik here to view.
      How to create a simple list report in Microsoft Dynamics 365 Business Central or Dynamics NAV

      This blog explains how to create a simple list report (non-processing only) in Microsoft Dynamics NAV or Business Central On Premises, based on the Customer table. This example will include the following requirements:

      • Add the Report columns:  No., Name, City, Balance
      • Provide request fields on the report: No., Sales Person Code
      • Exclude the customers with Balance = 0 from the report output. You will use report data item property to do that
      • Create a Boolean option (check box) on request page called. “Show Customers with Balance”
      • Find the Total of Balance and display that value at the end of report by adding a field for Total and displaying it there.
      • Show Balance Customer option always set to TRUE; by default, the value should be  TRUE anytime the report is run.
      • Set up the report to display a simple message, ‘Report Completed’ at the end of the report, using the appropriate Report Trigger.

      Reports are used to print information from a database. A report can be used to structure and summarize information, and reports can be used to print documents such as invoices. Reports can also be used to process data without printing anything.

      The data set used for the report is a collection of data items. These data items correspond to fields in a table. When the report is run, each data item is iterated for all records in the underlying table with an appropriate filter defined.

      1. Create a report in Visual Studio, similar to that shown in Figures 1 and 2, based on the standard file format and then defining the RDLC layout syntax and adding four columns in customer table.
        Image may be NSFW.
        Clik here to view.
        Figure 1 - Adding four columns in RDLC layout report in Microsoft Dynamics Business Central on premises or NAV

        Figure 1 - Adding four columns in RDLC layout report in Microsoft Dynamics Business Central on premises or NAV
      2. Use the keyboard shortcut -> F5 to publish. You will get a new file with the extension .rdl. Right-click and open it using Reveal in Explorer.
        Image may be NSFW.
        Clik here to view.
        Fig 2 – Opening the .rdl file using the Reveal in Explorer option in Microsoft Dynamics Business Central on premises or NAV

        Fig 2 – Opening the .rdl file using the Reveal in Explorer option in Microsoft Dynamics Business Central on premises or NAV
      3. Double-click on the .rdl path to open the file in SQL Report Builder.
      4. Create four columns using the Table wizard, which will create the report structure, as shown in Figure 3.
        Image may be NSFW.
        Clik here to view.
        Figure 3 – Adding columns to a report in Microsoft Dynamics Business Central on premises or NAV

        Figure 3 – Adding columns to a report in Microsoft Dynamics Business Central on premises or NAV
      5. Provide request fields on the report: No., Sales Person Code. The Request field is simply the name of the fields that will be included in the request filter form.
        Image may be NSFW.
        Clik here to view.
        Figure 4 - Request filter fields added in customer report in Microsoft Dynamics Business Central on premises or NAV

        Figure 4 - Request filter fields added in customer report in Microsoft Dynamics Business Central on premises or NAV
      6. Exclude the customers with Balance = 0 from the report output. Use report data item property to do this.
        Image may be NSFW.
        Clik here to view.
        Figure 5 - Using the data item table view property for Exclude the Customers with Balance = 0 in Microsoft Dynamics Business Central on premises or NAV

        Figure 5 - Using the data item table view property for Exclude the Customers with Balance = 0 in Microsoft Dynamics Business Central on premises or NAV
      7. Create a Boolean option (check box) on the request page called; “Show Customers with Balance” and declare a Boolean variable for that request page.
        Image may be NSFW.
        Clik here to view.
        Figure 6 - Defining the request page in Microsoft Dynamics Business Central on premises or NAV

        Figure 6 - Defining the request page in Microsoft Dynamics Business Central on premises or NAV
      8. Run the report. You should see a result similar to that shown in Figure 7.
        Image may be NSFW.
        Clik here to view.
        Figure 7 - Request page and request filter fields in Microsoft Dynamics Business Central on premises or NAV

        Figure 7 - Request page and request filter fields in Microsoft Dynamics Business Central on premises or NAV
      9. Manage the report output based on this Boolean option while running the report. If this option is checked to TRUE, it should include only those customers with Balance <> 0.
        Image may be NSFW.
        Clik here to view.
        Figure 8 - Customer balance <>0 with the Boolean option set to TRUE in Microsoft Dynamics Business Central on premises or NAV

        Figure 8 - Customer balance <>0 with the Boolean option set to TRUE in Microsoft Dynamics Business Central on premises or NAV
      10. The page extension tells where you want to extend the actions or features. In Figure 11, you see how to extend the features in the customer list, or you can use 22 instead of “customer list” because 22 is the page number of customer list.
        Image may be NSFW.
        Clik here to view.
        Figure 9 - Creating a page extension (assigning the variable to report and report name) in Microsoft Dynamics Business Central on premises or NAV

        Figure 9 - Creating a page extension (assigning the variable to report and report name) in Microsoft Dynamics Business Central on premises or NAV
      11. Use F5 or the shortcut Ctrl + G and select > AL: Publish. The customer page will open; go to Navigate -> Customer -> comments ->Customer report exercise list (Action name).
        Image may be NSFW.
        Clik here to view.
        Figure 10 - The action is added after comments, and the name of the action is CustomerReportExerciesList in Dynamics Business Central on premises or NAV

        Figure 10 - The action is added after comments, and the name of the action is CustomerReportExerciesList in Dynamics Business Central on premises or NAV
        The dialog box will show if the “show customer with balance” option set to TRUE, as shown in Figure 11.
        Image may be NSFW.
        Clik here to view.
        Figure 11 - Setting the “show customer with balance” option to TRUE in Microsoft Dynamics Business Central on premises or NAV

        Figure 11 - Setting the “show customer with balance” option to TRUE in Microsoft Dynamics Business Central on premises or NAV
        Figure 12 shows the output of the “show customer with balance” request page (set to TRUE).
        Image may be NSFW.
        Clik here to view.
        Figure 12 - Output of the TRUE condition in Microsoft Dynamics Business Central on premises or NAV

        Figure 12 - Output of the TRUE condition in Microsoft Dynamics Business Central on premises or NAV
        If the option is not checked or is set to FALSE, the report will show all customers (customers with Balance =0 and <> 0), as shown in Figure 13.
        Image may be NSFW.
        Clik here to view.
        Figure 13 – Output of report with “Show customer with balance” option set to FALSE in Microsoft Dynamics Business Central on premises or NAV

        Figure 13 – Output of report with “Show customer with balance” option set to FALSE in Microsoft Dynamics Business Central on premises or NAV
      12. Find the Total of Balance and display that value at the end of the report by adding a field for Total and displaying it. TIP: Use AL code report trigger to accumulate the Balance value for each customer and use that same trigger to display in the report output.
        Image may be NSFW.
        Clik here to view.
        Figure 14 - Adding a Total Balance column in a report in Microsoft Dynamics Business Central on premises or NAV

        Figure 14 - Adding a Total Balance column in a report in Microsoft Dynamics Business Central on premises or NAV
        Some fields are added in Figure 15, and the variables syntax shows that the values are assigned to the decimal data type.
        Image may be NSFW.
        Clik here to view.
        Figure 15 – Declaring a variable for total balance in Microsoft Dynamics Business Central on premises or NAV

        Figure 15 – Declaring a variable for total balance in Microsoft Dynamics Business Central on premises or NAV
      13. Insert a new row in the table.
        Image may be NSFW.
        Clik here to view.
        Figure 16 - Inserting new row for Total Balance field in Microsoft Dynamics Business Central on premises or NAV

        Figure 16 - Inserting new row for Total Balance field in Microsoft Dynamics Business Central on premises or NAV
      14. Set the expression for the Total Balance field in the report builder.
        Image may be NSFW.
        Clik here to view.
        Figure 17 - Defining the expression Microsoft Dynamics Business Central on premises or NAV

        Figure 17 - Defining the expression Microsoft Dynamics Business Central on premises or NAV
        Figure 18 shows the condition for getting the Total Balance in this report. This example uses the last formula to calculate every customer balance and add to the previous customer balance.
        Image may be NSFW.
        Clik here to view.
        Figure 18 – The condition for getting the Total Balance in Microsoft Dynamics Business Central on premises or NAV

        Figure 18 – The condition for getting the Total Balance in Microsoft Dynamics Business Central on premises or NAV
        Image may be NSFW.
        Clik here to view.
        Figure 19 – The result for the Total Balance in Microsoft Dynamics Business Central on premises or NAV

        Figure 19 – The result for the Total Balance in Microsoft Dynamics Business Central on premises or NAV

        The Show Balance Customer option is always set to TRUE, so by default it should be TRUE anytime the report is run or the request page is opened.
        Image may be NSFW.
        Clik here to view.
        Figure 20 - When the report is loaded, a trigger is fired in Microsoft Dynamics Business Central on premises or NAV

        Figure 20 - When the report is loaded, a trigger is fired in Microsoft Dynamics Business Central on premises or NAV
        NOTE: When you publish the report, make sure the default request page is set to TRUE.
      15. To set up a simple message, ‘Report Completed’, to be shown at the end of the report, use the appropriate Report Trigger to write a line of AL code for it, as shown in Figure 23.
        Image may be NSFW.
        Clik here to view.
        Figure 21 – Setting up a simple message to include once the report is completed in Microsoft Dynamics Business Central on premises or NAV

        Figure 21 – Setting up a simple message to include once the report is completed in Microsoft Dynamics Business Central on premises or NAV

       

      If you have any questions about reporting or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

      Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

      If you are interested in NAV/Business Central development, check out our collection of NAV and Business Central Development Blogs.

      Blog Tags: 

      Grouping in RDLC Report in Microsoft Dynamics NAV or Business Central

      How To: Group in the RDLC Report in Microsoft Dynamics Business Central or NAV Image may be NSFW.
      Clik here to view.
      How to Group RDLC reports in Microsoft Dynamics NAV or Business Central

      This blog explains how to do grouping in the RDLC Report in Microsoft Dynamics Business Central or NAV. There are two steps involved: designing the data set and using the Report Builder to set the grouping.

      Step 1: Design the Data Set

      1. In Developer Environment, there are two options to select a new and to modify the existing data set: New and Design. Create a new one by selecting “New.”
      2. Choose the source as required. In the example in Figure 1, the data source is Customer.
      3. Provide the fields by selecting Field Menu option and choosing the fields you want.
        Image may be NSFW.
        Clik here to view.
        Figure 1 - Selecting a data source and fields for grouping in RLDC report in Microsoft Dynamics Business Central or NAV

        Figure 1 - Selecting a data source and fields for grouping in RLDC report in Microsoft Dynamics Business Central or NAV
        The designer set is now complete.
      4. Save the report by providing an ID and Name

      Step 2: Create the Group in the Report Builder

      1. To open the Report Builder, select “Layout” From the “View” menu.
      2. Provide the fields in the dataset in a table by right-clicking ->insert -> table.
      3. To create a group, on the left side of the screen, right-click and choose Add Group ->Row Group ->Parent Group.
      4. Choose the required option for grouping. In the example in Figure 2, the grouping is done by Location code. Click ok.
        Image may be NSFW.
        Clik here to view.
        Figure 2 - Grouping according to Location code in Microsoft Dynamics Business Central

        Figure 2 - Grouping according to Location code in Microsoft Dynamics Business Central
        The output generated will be similar to that shown in Figure 3.
        Image may be NSFW.
        Clik here to view.
        Figure 3 – Report with grouping in Microsoft Dynamics Business Central

        Figure 3 – Report with grouping in Microsoft Dynamics Business Central

       

      If you have any questions about reports or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

      Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

      If you are interested in NAV/Business Central development, check out our collection of Business Central and NAV Development Blogs.

      Blog Tags: 

      Replicating Data from Microsoft Dynamics NAV On Premises to Dynamics Business Central SaaS

      How To: Replicate Data from Microsoft Dynamics NAV on premises to Dynamics Business Central SaaS Image may be NSFW.
      Clik here to view.
      How to replicate data from Microsoft Dynamics NAV on premises to Microsoft Dynamics 365 Business Central SaaS

      To replicate a database from Microsoft Dynamics NAV on premises to Dynamics Business Central SaaS, follow these steps:

      NOTE: In this example, a Microsoft Dynamics NAV (on premises) Name Database has been restored as BC SaaS Testing.

      1. Copy the company “Cronus USA” using the Copy function, Create a New Company, and name it BCSaasTesting.
      2. Open the Business Central Tenant and login with the user name provided.
        Image may be NSFW.
        Clik here to view.
        Figure 1 – Microsoft Dynamics Business Central login

        Figure 1 – Microsoft Dynamics Business Central login
      3. Create the Sandbox environment.
        • Search – Sandxxxxxxxxxxxxxxxxxx
        • Click “Sandbox Environment (Preview)”

      Image may be NSFW.
      Clik here to view.
      Figure 2- Creating a sandbox environment in Microsoft Dynamics Business Central

      Figure 2- Creating a sandbox environment in Microsoft Dynamics Business Central
      The Sandbox Environment (Preview) window will open.
      Image may be NSFW.
      Clik here to view.
      Figure 3 – The sandbox environment Preview in Microsoft Dynamics Business Central

      Figure 3 – The sandbox environment Preview in Microsoft Dynamics Business Central

      1. Click "Create" (to create the sandbox).
        You are now in the Sandbox environment.
        Image may be NSFW.
        Clik here to view.
        Figure 4 – The sandbox environment in Microsoft Dynamics Business Central

        Figure 4 –The sandbox environment in Microsoft Dynamics Business Central
      2. Click “Assisted Setup.”
      3. Click “Set up Intelligent Cloud.”
      4. Accept the INTELLIGENT CLOUD SETUP and click “Next.”
      5. Select the Product: Click on the 3 dots to get a list of Products.
      6. Select “Dynamics 365 Business Central” and click “OK;” then click “Next.”
      7. Select the SQL Configuration from the drop down and select “SQL Server.
      8. Enter the SQL Connection String. There are 2 ways to do this:
        • Server=WinSrv1\SQL2008;Database=myDataBase;UID=myUsername;PWD=myPassword;
        • or Data Source= WinSrv1\SQL2008;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

      This example uses the first option:
      Server=bcdev01\NAVDEMO;Database= BC Saas Testing; UID=sa;PWD=xxx;

      1. Paste this string in SQL Connection String and click “Next".
      2. ”Click “Download the Self Hosted Integration Runtime (SHIR).”
      3. Copy the Authentication Key and put it in your notepad.
      4. Self-Hosted Integration Runtime (SHIR) is downloaded. Run and Install the Setup.
        Image may be NSFW.
        Clik here to view.
        Figure 5 – Self-hosted Integration Runtime Setup Wizard in Microsoft Dynamics Business Central

        Figure 5 – Self-hosted Integration Runtime Setup Wizard in Microsoft Dynamics Business Central
      5. When the Setup is installed, click “Finish.”
      6. Paste the Authentication key you copied into your notepad and click “Register.”
      7. Click “Finish.”
        Integration Runtime has been successfully registered.
      8. Click “Launch Configuration Manager.”
        Microsoft Integration Runtime Configuration Manager window will open to Test Connection.
      9. Click “Test.”
      10. Click “Next.”
        The system will ask you which company you want to replicate.
      11. Select the company you want to replicate and click “Next.”
      12. Activate automatic schedule to replicate the Data by toggling the button. Click “Next.”
      13. Click “Finish” to replicate the company.
      14. Type in the first few letters of “Intelligent Cloud Management and click on it when it appears.
      15.  Initialization of the company is completed. The company is replicated, but as now it’s blank.
      16. To set the system manually to replicate the data, click “Action,” then click “Run Replication Now.”
      17. Note the time you started the data replication. Time on Virtual Machine: 2:35 PM.
      18. The system will ask “Are you sure you want to trigger replication?” Click “Yes.”
      19. A box with the message, “Replication has been successfully triggered; you can track the status on the Management page” will appear. Click “OK.”
      20. On the Intelligent Cloud Management page, you can check the completion of the Data replication status.
        Image may be NSFW.
        Clik here to view.
        Figure 6 – Intelligent Cloud Management page in Microsoft Dynamics Business Central

        Figure 6 – Intelligent Cloud Management page in Microsoft Dynamics Business Central
      21. Refresh the page in between to check the status.
        Image may be NSFW.
        Clik here to view.
        Figure 7 – Refreshing the status of the Intelligent Cloud Management page in Microsoft Dynamics Business Central

        Figure 7 – Refreshing the status of the Intelligent Cloud Management page in Microsoft Dynamics Business Central
        The process ends @ 2:42 PM. The data is replicated.
      22. Click the tile “482 Tables Successful” on the right side of the page to find which table data was replicated.
        Image may be NSFW.
        Clik here to view.
        Figure 8  – Table data successfully replicated in Microsoft Dynamics Business Central

        Figure 8  – Table data successfully replicated in Microsoft Dynamics Business Central
      23. Click tile “12 Tables Failed” to find out which table data was not replicated.
        Image may be NSFW.
        Clik here to view.
        Figure 9  – Table data NOT successfully replicated in Microsoft Dynamics Business Central

        Figure 9  – Table data NOT successfully replicated in Microsoft Dynamics Business Central

      Why did the data in these 12 tables fail to replicate in this example? This example is an on-premises version of Business Central, so either a CU has been applied to the on-premises system before the update made it to the cloud tenant, or the cloud tenant has an update for which the corresponding CU has not been applied on premises. 

      If you have any questions about this process, contact ArcherPoint.

      Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV. If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

      Blog Tags: 

      Correcting Errors in Dynamics NAV - Publish Extension Error and Could Not Open Specified Startup Page

      How To: Correct Two Common Errors in Microsoft Dynamics Business Central or NAV
      Image may be NSFW.
      Clik here to view.
      Correcting two common errors in Dynamics NAV / Business Central programming

      Publish Extension Error

      If you encounter an error when trying to publish an extension from VSCode in Microsoft Dynamics Business Central or NAV, use the following to correct it.

      The error will look like this:

      The request for path /DynamicsNAV130/dev/metadata failed with code InternalServerError.
      Reason: NetFx40_LegacySecurityPolicy is enabled and must be turned off in the Microsoft.Dynamics.Nav.Server.exe.config file.

      1. Open the notepad as administrator.
      2. Open the Microsoft.Dynamics.NavServer.exe.config file from C:\Program Files\Microsoft Dynamics 365 Business Central\130\Service
        Image may be NSFW.
        Clik here to view.
        Figure 1 - Open the Microsoft.Dynamics.NavServer.exe file in Microsoft Dynamics Business Central or NAV

        Figure 1 - Open the Microsoft.Dynamics.NavServer.exe.config file in Microsoft Dynamics Business Central or NAV
      3. Change the NetFx40_LegacySecurityPolicy enabled to False
        Image may be NSFW.
        Clik here to view.
        Figure 2 –Change the NetFx40_LegacySecurityPolicy enabled to False in Microsoft Dynamics Business Central or NAV

        Figure 2 –Change the NetFx40_LegacySecurityPolicy enabled to False in Microsoft Dynamics Business Central or NAV
      4. Save the file, then restart the service.

      Publish Extension Error

      If you face the error, Could Not Open the Specified Startup Page, in Microsoft Dynamics Business Central or NAV, use the following to correct it.

      The error will look like this:

      Could not open the specified startup page. Please check that the server configuration key PublicWebBaseUrl has been properly set. 

      1. Open Business Central or NAV Administration Console.
      2. Configure the “Web Client Base URL“ in Service.
        Image may be NSFW.
        Clik here to view.
        Figure 3 - Configure the “Web Client Base URL“ in Service in Microsoft Dynamics Business Central or NAV

        Figure 3 - Configure the “Web Client Base URL“ in Service in Microsoft Dynamics Business Central or NAV Administration Console
      3. Save the changes and restart.
      4. Open the VS Code and publish.

      If you have any questions about Extensions or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

      Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV. If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

          Blog Tags: 

          How to use Workflows to Set Up an Industry Practice in Microsoft Dynamics NAV or Business Central

          How To: Use Workflows to Set Up an Industry Practice in Microsoft Dynamics NAV or Business Central Image may be NSFW.
          Clik here to view.
          Using Workflows in Dynamics NAV or Business Central to automate an industry practice

          A workflow is an easy way to connect business processes to the best industry practices. This functionality is available in Dynamics NAV 2016 and later, as well as Dynamics Business Central. The workflow module provides a platform to build instructions for automated commands. This functionality is for automating processes such as email, notifications, and approvals.

          A workflow executes an action when an event occurs. The basic building blocks of workflows are:

          • Event– what needs to trigger to activate the workflow
          • Condition– allows for specifying filters for records that the workflow will apply to
          • Response– one or more actions that the workflow will execute once the conditions have been met

          When strung together, these workflow steps can supplement a wide range of day-to-day activities and make business processes more efficient through automation.

          Following is an example of workflows in action:

          When you enter in Item, identify the need for approval before proceeding. NAV/BC will then send the approver an approval request, giving them the option to approve, reject, or delegate the approval request.

          Let’s take a deep dive in this process.

          1. Set up the Approval User Setup according to the company’s hierarchy, as shown in Figure 1. Go to Departments/Administration/Application Setup/Workflow/Administration, or Search on the right top of Role Center. To get the details of the Fields, you can point on the caption.
            Image may be NSFW.
            Clik here to view.
            Figure 1 – Approval user setup in Microsoft Dynamics NAV/Business Central

            Figure 1 – Approval user setup in Microsoft Dynamics NAV/Business Central 
            Microsoft has added workflow templates so that common workflows can be easily enabled. See Figure 2 for a list of templates provided by Microsoft.
            Image may be NSFW.
            Clik here to view.
            Figure 2 - Workflow templates available in Microsoft Dynamics NAV/Business Central

            Figure 2 - Workflow templates available in Microsoft Dynamics NAV/Business Central
          2. The workflow can be accessed from Departments/Administration/Application Setup/Workflow/Workflow Templates, or Search on the right top of Role Center.
          3. To enable the workflow template for item approval, click on New Workflow from Template on the top left corner.
          4. Item approval entries need to be created when the Item Category is CHAIR (Condition). It will create a new record in the approval entry (Response). Enable the workflow, and its ready, as shown in Figure 3.
            Image may be NSFW.
            Clik here to view.
            Figure 3 - Enable Workflow in Microsoft Dynamics NAV/Business Central

            Figure 3 - Enable Workflow in Microsoft Dynamics NAV/Business Central
          5. To check this workflow, open the Item Card and filter the Item Category Code as CHAIR, then Send Approval request.
            Image may be NSFW.
            Clik here to view.
            Figure 4 - Item card in Microsoft Dynamics NAV/Business Central

            Figure 4 - Item card in Microsoft Dynamics NAV/Business Central
            Approval entries will be created, and the approver can view these entries in Document Approval Entries. The approver can view, approve, reject, or delegate the approval request, as shown in the Figure 5.
            Image may be NSFW.
            Clik here to view.
            Figure 5 - Approval Entries in Microsoft Dynamics NAV/Business Central

            Figure 5 - Approval Entriesin Microsoft Dynamics NAV/Business Central
            Image may be NSFW.
            Clik here to view.
            Figure 6 - Approval Entry Item Card in Microsoft Dynamics NAV/Business Central

            Figure 6 - Approval Entry Item Card
            in Microsoft Dynamics NAV/Business Central

           

          If you have any questions about this process, workflows, or other Microsoft Dynamics NAV or Business Central functionality contact ArcherPoint.

          Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

          If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

          Blog Tags: 

          Customizing Microsoft Dynamics Business Central On Premises Using Page Types

          How to: Customize Microsoft Dynamics Business Central On Premises Using Page Types 

          Image may be NSFW.
          Clik here to view.
          Customizing Microsoft Dynamics Business Central On Premises Using Page Types

          Pages allow the user to interact with Microsoft Dynamics 365 Business Central. Pages can be displayed on multiple display targets, like computers, tablets, and smart phones. A page can be linked to a source table or not. If they are not linked to a source table, they are either Role Center Pages or blank pages. There are several default page types in the application:

          Type of pages:

          • Card page
          • List page
          • Card part page
          • List part page
          • Worksheet page
          • Document page
          • Role centre page
          • Confirmation dialog page
          • List plus page
          • Standard dialog page
          • Navigate page

          Here is how to customize a page:

          1. Create a table so you can define the page type.
            Image may be NSFW.
            Clik here to view.
            Figure 1 – Creating a new file for a table and by using snippet in Dynamics Business Central on premises

            Figure 1 – Creating a new file for a table and by using snippet in Dynamics Business Central on premises
            Image may be NSFW.
            Clik here to view.
            Figure 2 – Adding remaining fields in same table in Dynamics Business Central on premises

            Figure 2 – Adding remaining fields in same table in Dynamics Business Central on premises
            Image may be NSFW.
            Clik here to view.
            Figure 3 – Adding remaining fields in the same table in Dynamics Business Central on premises

            Figure 3 – Adding remaining fields in the same table in Dynamics Business Central on premises

            The key is used to make records unique and to optimize the performance of the database when you search or filter. Each table in Business Central needs a primary key. You cannot have keyless tables in your application. If you don’t create a key yourself, the application will use the first field of your table description as your primary key.

            In a table, you can have primary and secondary keys. The primary key is always the first key in the list. It is always active, and it makes records unique. You can have up to 40 keys per table, and each key can consist of maximum 20 fields.

            Secondary keys are optional, and they can help you perform search actions faster. They might have an impact on performance, as they are indexes in SQL Server. So, a best practice is to three to five secondary keys maximum per table.
            Image may be NSFW.
            Clik here to view.
            Figure 4 –Declaring keys in course table in Dynamics Business Central on premises

            Figure 4 –Declaring keys in course table in Dynamics Business Central on premises
          2. Create a page. Create a regular page, then include the same fields that are already mentioned in your table course. This page is very useful when defining values.
            Image may be NSFW.
            Clik here to view.
            Figure 5 – Creating a new file for page and by using snippet in Dynamics Business Central on premises

            Figure 5 – Creating a new file for page and by using snippet in Dynamics Business Central on premises

          Type 1: Card Page

          A Card page enables users to view and edit one record at a time. Use a Card page when there are too many fields to view on one line. A Card page always uses Fast Tabs, the first of which is called General. Tables that use Card pages only have one field in their primary key. This field always is displayed as the first field in the General Fast Tab.

          Image may be NSFW.
          Clik here to view.
          Figure 6 – Creating a new file for a card page in Dynamics Business Central on premises

          Figure 6 – Creating a new file for a card page in Dynamics Business Central on premises

          Result:

          The Card page contains one or multiple Fast Tabs like shown in Figure 7. There are Fast Tabs for invoicing, payments, and shipping, for example, and on top, there is the General Fast Tab.

          Image may be NSFW.
          Clik here to view.
          Figure 7 – The result after creating the page for a Card in Dynamics Business Central on premises

          Figure 7 – The result after creating the page for a Card in Dynamics Business Central on premises

          Type 2: List Page

          The List page is a multi-record page. It displays selected content from multiple records from a table in a list view. The example in Figure 8 shows multiple records from the course table, and there is more than one course record. Not all information is being displayed—just selected fields.

          Image may be NSFW.
          Clik here to view.
          Figure 8 – Creating a new file for a Page list in Dynamics Business Central on premises

          Figure 8 – Creating a new file for a Page list in Dynamics Business Central on premises

          Result:
          Image may be NSFW.
          Clik here to view.
          Figure 9 – The result after adding the fields in a course List page in Dynamics Business Central on premises

          Figure 9 – The result after adding the fields in a course List page in Dynamics Business Central on premises

          Type 3: Card Part Page

          Pages and Part Pages are usually linked so that the page part shows additional information about the record that is currently shown in the main page.

          A Card Part page displays number of fields, but not all the fields from the table. So, this example is displaying one record from the course table, that is, Installation & configuration. Only selected information is showing.

          The Card Part page is used in a fact box on another page. See the example in Figure 10.  The purpose is to view or edit additional fields associated with the record on the main page. Because a Card Part page is a page part just like the List Part Page that is explained later in this blog. This example is showing statistics from the record in the main page, and the main page is this source card where you can find information about Installation & Configuration.  This Card Part page is displaying vendor statistics information from this record.
          Image may be NSFW.
          Clik here to view.
          Figure 10 – Creating a Card Part page for a Course Card in Dynamics Business Central on premises

          Figure 10 – Creating a Card Part page for a Course Card in Dynamics Business Central on premises

          Result:
          Image may be NSFW.
          Clik here to view.
          Figure 11 – Card Part page result of Course Card in Dynamics Business Central on premises

          Figure 11 – Card Part page result of Course Card in Dynamics Business Central on premises

          Type 4: List Part Page

          A list part page is also a page part just like the card part page.  It is used as another page in a fact box or as a part of the role centre page.  A list part page displays content from a table in a list format in a fact box in another page.
          Image may be NSFW.
          Clik here to view.
          Figure 12 – Creating a List Part page for Course list in Dynamics Business Central on premises

          Figure 12 – Creating a List Part page for Course list in Dynamics Business Central on premises

          You can find the list part in Figure 13, where you can find the lines.
          Image may be NSFW.
          Clik here to view.
          Figure 13 - List Part page result of Course list in Dynamics Business Central on premises

          Figure 13 - List Part page result of Course list in Dynamics Business Central on premises

          Type 5: Worksheet Page

          A Worksheet Page is a multi-record page that enables users to view multiple records from a table and edit them. A worksheet page is used for creating worksheets or journal task pages. The Worksheet page consists of a single grid in the content area, and the section at the bottom has details about a selected grid line or the totals for the grids.

          You create an Item Journal Worksheet page for item inventory that up to date. This often uses the posting action on the Item Journal page to adjust inventory in relation to purchases and sales.

          A Worksheet page type can be used to create two types of pages:

          • Worksheet pages – Used to present data in a list and offer a choice of actions to the user.
          • Journal pages – Used to perform tasks, such as posting transactions.

          Figures 14 through 17 step through the creation of a Course Item Journal page.
          Image may be NSFW.
          Clik here to view.
          Figure 14 – Creating a new file for a worksheet table and adding fields by using snippet in Dynamics Business Central on premises

          Figure 14 – Creating a new file for a worksheet table and adding fields by using snippet in Dynamics Business Central on premises

          Image may be NSFW.
          Clik here to view.
          Figure 15 – Adding remaining fields in Dynamics Business Central on premises

          Figure 15 – Adding remaining fields in Dynamics Business Central on premises

          Image may be NSFW.
          Clik here to view.
          Figure 16 – Creating a new file for a Page and by using snippet in Dynamics Business Central on premises

          Figure 16 – Creating a new file for a Page and by using snippet in Dynamics Business Central on premises

          Image may be NSFW.
          Clik here to view.
          Figure 17 –Adding a Fact box in Dynamics Business Central on premises

          Figure 17 –Adding a Fact box in Dynamics Business Central on premises

          Result:
          Image may be NSFW.
          Clik here to view.
          Figure 18 - Output of the worksheet page in Dynamics Business Central on premises

          Figure 18 - Output of the worksheet page in Dynamics Business Central on premises

          The remaining page types will be discussed in a future blog. If you have any questions about Page types or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

          Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV. If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

          Blog Tags: 
          Viewing all 279 articles
          Browse latest View live