D365 Business Central : Amount Excluding VAT in Journal Entry
Sep05

D365 Business Central : Amount Excluding VAT in Journal Entry

When we are entering amount on journal entry page, such as General Journal, we only have option to use Amount Including VAT. Entering the value on the Amount field will automatically calculate the VAT Amount for you. On the above example, we fill in 100 in the Amount field. Below is the result of preview posting. Amount Including VAT is $100, VAT is 15%, Amount Excluding VAT is… Continue Reading thatnavguy’s Article on...

Read More
D365 Business Central : Using Excel Layout for Reporting
Aug24

D365 Business Central : Using Excel Layout for Reporting

Since Business Central 2022 Wave 1 (BC20), we have the ability to use Excel Layout for reporting. Excel layouts work the same way as Word and RDLC layouts in that they can be edited and saved back again into Business Central. With Excel layouts for Business Central reports, users can now create and edit report layouts simply by using the full capabilities in Excel such as sliders, diagrams,… Continue Reading thatnavguy’s...

Read More
D365 Business Central : Using Query to Get Distinct Values
Aug01

D365 Business Central : Using Query to Get Distinct Values

When working with table data, there will be times when we need to retrieve a unique record value (also called SELECT DISTINCT) from the table. D365 Business Central does not provide this logic out of the box so we will need to find a way to do this ourselves. We can use combination of looping and temporary table to find distinct values. However, I found that using Query is the easiest… Continue Reading thatnavguy’s Article...

Read More
D365 Business Central : Send Invoice Email with Attachments
Jul06

D365 Business Central : Send Invoice Email with Attachments

By standard, D365 Business Central can send posted sales invoice email to the customer. But what if you want to send other attachments as well in the email ? I will describe it here on how to customize it to send invoice email with all the attachments. To achieve this is quite easy, you only need to subscribe to OnBeforeSendEmail on Codeunit Document-Mailing. You can then call the… Continue Reading thatnavguy’s Article on...

Read More
D365 Business Central : Notify on Changed Permission Set
May31

D365 Business Central : Notify on Changed Permission Set

D365 Business Central contains a number of predefined permission sets (categorized by type System or Extension) that are added by Microsoft or by your software provider. We can use these Permission Sets as it is or create our own custom ones. We don’t need to start from scratch. Microsoft doesn’t allow us to modify the predefined ones, however we can copy these permission sets to a new one… Continue Reading...

Read More
D365 Business Central : Duplicate BC Container
May26

D365 Business Central : Duplicate BC Container

I recently have an issue where I need to spin up a new D365BC docker container for the same project. Because I already have some data in my current container, I want to duplicate my existing container (instead of creating a clean new one). I couldn’t find a direct command to duplicate a container, so I need to create a new image first from the existing container using commit. Using that… Continue Reading thatnavguy’s...

Read More
NAV2018 : Unexpected value ‘String’ of type ‘Microsoft.Dynamics.Nav.CodeAnalysis.NavTypeKind’
May11

NAV2018 : Unexpected value ‘String’ of type ‘Microsoft.Dynamics.Nav.CodeAnalysis.NavTypeKind’

When you work with NAV2018 extension, you may encounter an error that is difficult to figure out. This time, I encountered another one when trying to publish the extension. The app was compiled without any error, but it would error out when I tried to publish it. The request for path /NAV/dev/apps?tenant=default&SchemaUpdateMode=synchronize failed with code 422. Reason: Unexpected… Continue Reading thatnavguy’s Article...

Read More
D365 Business Central : Edit Table Data Directly
May09

D365 Business Central : Edit Table Data Directly

D365 Business Central does not allow you to directly modify the table data, especially for Cloud SaaS customers. There are some good reasons why we are not supposed to do that, such as for safety, consistency, audit, etc. Tempering the table data without knowledge on how the system works can cause you more issues at the end. However, what if we know what we are doing and we want to fix… Continue Reading thatnavguy’s...

Read More
D365 Business Central : Hide Enum Values
Apr29

D365 Business Central : Hide Enum Values

Enum is great way to centralized your list of options in Business Central. You can define an enum, then use the enum on every objects (such as table, page, report, etc) and they will all have the same list of options. However, what if you want to hide some of the options on specific pages or tables because it is not valid option for them ? It’s a good design to only provide user with only… Continue Reading...

Read More
Date Formula in Business Central
Apr22

Date Formula in Business Central

If you are working with NAV / Dynamics 365 Business Central, you will hear the term Date Formula. A date formula is a formula, abbreviated using combination of signs, letters and numbers, to calculate date. It is generally used to calculate date, such as Due Date or the next date for recurring job (Job Queue, Recurring Journals, etc). The date formula can contain a maximum of 32… Continue Reading thatnavguy’s Article on...

Read More
Find Duplicate AL Code
Mar31

Find Duplicate AL Code

AZ AL Dev Tools has just released a new command called “Find duplicate AL code”. It helps you a lot especially when you are working on refactoring your (or someone else) code. To use it, open the command palette and type Find Duplicate AL Code. Specify the minimum no. of statements to be considered as duplicate. The command will search your current project and open a panel… Continue Reading thatnavguy’s Article...

Read More
NAV2018 Token StartAttribute XML Error
Mar15

NAV2018 Token StartAttribute XML Error

While working with NAV2018 extension, I encountered this strange error when trying to build the package. The error message doesn’t explain much as well. Processing of message ‘al/createPackage’ failed with error: ‘Token StartAttribute in state Element Content would result in an invalid XML document. It turned out the issue was on the compiler bug. One way to fix this issue was to… Continue Reading...

Read More
Generate Symbol on NAV2018 (BC11)
Mar14

Generate Symbol on NAV2018 (BC11)

When we are working with NAV 2018 extension, we should avoid changing standard objects. However, there are times when we need to change it, such as adding an event or changing the visibility from internal to external. If we try to make changes (for example Codeunit 90) then try to download the symbols, we will find out that the Codeunit 90 is no longer in the symbol. In order to… Continue Reading thatnavguy’s Article on...

Read More
License Configuration
Mar10

License Configuration

D365 Business Central 2022 Release Wave 1 (BC20) is almost here. One of the new features in BC20 is the License Configuration. When you get new users in Business Central, BC will automatically assign you the User Group automatically. Prior to BC20, If you want to change the default user group, the only way to do this is by manipulating User Group Plan. With License Configuration,… Continue Reading thatnavguy’s Article on...

Read More
VSCode Extension: Bookmark
Mar04

VSCode Extension: Bookmark

If you are using VS Code, there are lots of VS Code extensions that can increase your productivity. One of them is Bookmark. It lets you create a bookmark (and label them) anywhere in your files. You can then quickly navigate between bookmarks easily without searching your code. Here are some of the features that Bookmarks provides: Mark/unmark positions in your codeMark positions… Continue Reading...

Read More
We’ve Moved !
Mar02

We’ve Moved !

After more than two years, I finally decided to have my own website. It’s been a journey of using this blog, and now it is time to move on. Head over to https://thatnavguy.com for the latest posts. Continue Reading thatnavguy’s Article on their blog https://thatnavguy.wordpress.com/2022/03/02/weve-moved/ Blog Syndicated with thatnavguy’s Permission

Read More
Quantity Rounding Precision
Feb24

Quantity Rounding Precision

The value xxx in field Quantity is of lesser precision than expected. Note: Default rounding precision of 0.00001 is used if a rounding precision is not defined. Microsoft introduced Quantity Rounding Precision on BC 2021 Wave 2. The purpose is to reduce rounding issues when converting between unit of measure. I first noticed this when I got an error when I tried to enter decimal into… Continue Reading thatnavguy’s Article...

Read More
D365 Business Central : Quantity Rounding Precision
Feb24

D365 Business Central : Quantity Rounding Precision

The value xxx in field Quantity is of lesser precision than expected. Note: Default rounding precision of 0.00001 is used if a rounding precision is not defined. Microsoft introduced Quantity Rounding Precision on BC 2021 Wave 2. The purpose is to reduce rounding issues when converting between unit of measure. I first noticed this when I got an error when I tried to enter decimal into… Continue Reading thatnavguy’s Article...

Read More
Create Notifications in BC
Feb24

Create Notifications in BC

Notifications What is a notification ? Notifications are non-intrusive information to give users information about a current situation, but do not require any immediate action or block users from continuing with their current task. For example, you could have a notification that a customer’s credit limit is exceeded or not enough inventory or overdue balance, etc. Using notification is a… Continue Reading...

Read More
Converting BC PermissionSet XML to PermissionSet Object
Feb18

Converting BC PermissionSet XML to PermissionSet Object

Since BC18, we can define PermissionSet object on our app to replace the PermissionSet XML. The PermissionSet object is much simpler and clear to use than the XML. If you already using XML in your app, you will eventually need to convert it from XML to Object, then maps all your users usage of the old Xml PermissionSet to the new PermissionSet object. Currently, there is no standard way to… Continue Reading thatnavguy’s...

Read More
Printing 1D and 2D Barcode
Jan18

Printing 1D and 2D Barcode

Barcode Printing Microsoft recently added support for printing 2D barcode. If you are on cloud, you don’t need to purchase the barcode font because Microsoft has already provided and licensed them for you. The cloud font packages are provided by IDAutomation Inc. We are going to see how to print both 1D and 2D barcode. Read Microsoft documentation here to see the list of supported… Continue Reading thatnavguy’s...

Read More
Selection Filter Management
Jan14

Selection Filter Management

G/L Account Totaling field Ever heard of SelectionFilterManagement codeunit ? It’s a centralized codeunit that is used to built up filter string based on multiple selected records on the page. An example of usage of SelectionFilterManagement codeunit can be seen on G/L Account Card under Totaling field. When you click on Assist Edit button on Totaling field, the G/L Account List lookup… Continue Reading thatnavguy’s...

Read More
Business Central Code History
Jan10

Business Central Code History

Business Central code gets updated from time to time. It’s hard to keep track which ones get updated on each version. Thankfully, Stefan Maron has done a fantastic job creating and sharing the repository for us. GitHub – StefanMaron/MSDyn365BC.Code.History: Contains the Microsoft Business Central Code. Updated each month. This repository holds all versions of the Buisness Central Apps. The purpose is to quickly be able to...

Read More
The Mysterious Case of Bin Content Quantity
Dec22

The Mysterious Case of Bin Content Quantity

I was working on getting inventory availability using Bin Contents and for some reason, I could never get the correct quantity for each Bin. Bin Contents Quantity field in Bin Content is a FlowField which means the field is not a physical field. It is calculated when needed from Warehouse Entry. Quantity is related to the Unit of Measure. Quantity (Base) is related to the Base… Continue Reading thatnavguy’s Article on...

Read More
Filtering OData Feeds
Dec21

Filtering OData Feeds

Last time we talked about getting OData Feeds into Excel, this time let’s talk about how to filter that OData Feeds. When you connect and pull data using OData, it pulls ALL the records from the feed that you have selected. If you are dealing with large data, it is expensive to pull large data every single time you do the pull. Historical data such as ledgers can take from minutes to… Continue Reading thatnavguy’s...

Read More
Getting D365 Business Central Data to Excel Using OData Feeds
Dec19

Getting D365 Business Central Data to Excel Using OData Feeds

Excel with OData Feed Apart from Open in Excel or Copy Paste, there is another way to get your data from D365 Business Central to Excel using OData feed. After pulling the data from BC to Excel, you can then use Excel functionality to do charts or pivots to produce the report that you want. Let’s take a look on how to do this. Start by searching for Web Services page. The Web Services… Continue Reading thatnavguy’s...

Read More
Purchase Order Dates
Dec06

Purchase Order Dates

Purchase Order Last time we talk about Sales Order Dates. Now let us talk about the purchasing side. Similar to Sales side, there are a lot of date fields on purchase orders which can be confusing, especially the dates on the Purchase Lines. However, if used correctly, you can use these dates to improve your purchase order processing. You can measure your vendor performance more… Continue Reading thatnavguy’s Article on...

Read More
Sales Order Dates
Dec02

Sales Order Dates

There are a lot of date fields on sales orders. The dates can be confusing, especially the dates on the Sales Lines. However, if used correctly, you can use these dates to improve your sales order processing. You can fulfill your customer’s requirement better and measure your DIFOT more accurately. The dates can be located on Header only, Line only, or both Header and Line. If the date… Continue Reading thatnavguy’s...

Read More
Vendor Lead Time vs Item Lead Time
Nov28

Vendor Lead Time vs Item Lead Time

Requisition Worksheets In Business Central, you can put a lead time against Vendor or Item card. One of my clients was asking what will happen if you put lead time on both Vendor and Item card. Will BC give suggestion based on Vendor or Item Lead Time ? To test the lead time, I create a Sales Order with Requested Delivery Date and Planned Shipment Date on 31 December 2021. If I run… Continue Reading thatnavguy’s Article on...

Read More
Where is Edit/Open in Excel in BC19?
Nov25

Where is Edit/Open in Excel in BC19?

Dynamics 365 Business Central has recently been updated to October 2021 Wave 2 update. If you are wondering why you can no longer find Edit/Open in Excel, you are not alone. But don’t worry ! It’s still there. Microsoft decided to move it inside a new share icon (along with the new Teams sharing feature). Cool ! But what about my query/smart list page ? I couldn’t find the share… Continue Reading...

Read More
Delete Special Characters in Text
Nov25

Delete Special Characters in Text

If you want to remove any specific characters in a text, such as removing -*!? characters, you can use below code. NewText := DelChr(OldText, ‘=’, ‘-*!?’); If you want to do it the other way around, such as keeping only A-E characters and remove the rest, you can use below code. NewText := DELCHR(OldText,’=’,DELCHR(OldText,’=’,’ABCDEabcde’)); Continue Reading...

Read More
Copy Production to Sandbox (the new way)
Nov18

Copy Production to Sandbox (the new way)

We used to be able to create a copy of production to sandbox under New button. I noticed this morning that the option is no longer there. Where is the Copy Environment option ? Microsoft has moved the option to the environment itself. You can open the environment and use the Copy function. Continue Reading thatnavguy’s Article on their blog Copy Production to Sandbox (the new way) We used to be able to create a copy of...

Read More
Style Color
Nov17

Style Color

Highlighting your field can be a very helpful for your user. For example, overdue invoices are colored in red, so users can quickly recognize and pay more attention on those invoices. Business Central offers a way to highlight these fields using Style property. Though limited in style selection, it is still pretty powerful tool to use. field(Description; Rec.Description) { … Continue Reading thatnavguy’s Article on their...

Read More
Page Inspection
Nov14

Page Inspection

Page Inspection The page inspection feature enables you to get details about a page, providing insight into the page design, the different elements that comprise the page, and the source behind the data it displays. Page inspection is especially designed for administrators, power users, support personnel, and developers. It is ideal for learning the data model behind a page and… Continue Reading thatnavguy’s Article on...

Read More
Report Limit
Nov08

Report Limit

To ensure the availability and quality of Business Central services, Microsoft put a certain limitation on the reports, such as Max Execution Timeout to prevent report running continuously for days. You can see this limitation when you run any report under Advanced section. If you go over the limit, the report will be canceled. Below is an example where I setup the Maximum Rows as… Continue Reading thatnavguy’s Article on...

Read More
Sandbox Cleanup Event
Nov06

Sandbox Cleanup Event

When a sandbox is created as a copy of a production environment, BC will do the following things automatically: The job queue is stoppedAny base application integration settings are clearedOutbound HTTP calls from extensions are blocked by default and must be approved for each extension. This is done to prevent any unwanted email / result coming from your sandbox. What happen if… Continue Reading thatnavguy’s Article on...

Read More
Checking Lot Numbers in Bin Content
Oct12

Checking Lot Numbers in Bin Content

When we use Item Tracking, BC will capture the Serial or Lot Number by Location in the Item Ledger Entries table, and by Bin in the Warehouse Entries table (if we enable “Lot Warehouse Tracking”). However, when you look at the Bin Content, it only tells you the quantity on that Bin. It doesn’t tell you which Serial or Lot Number is currently on that bin. If you click on Quantity… Continue Reading...

Read More
Page OnLookup Trigger
Sep23

Page OnLookup Trigger

There are multiple ways in BC to create a Lookup button for a variable in a page or report. Generally speaking, I have seen three following methods being done to achieve the lookup button. 1. Using Table Relation field(fieldItemCode1; ItemCode) { ApplicationArea = All; Caption = ‘Item Code 1’; TableRelation = Item.”No.”; trigger OnValidate() begin … Continue Reading thatnavguy’s Article on their...

Read More
Get Client Type in AL
Sep02

Get Client Type in AL

If you want to know, if a user accessing BC from a device, desktop, or API, you can use the Client Type. Let’s say for an example, you want to limit user modifying from from tablet or phone, you can use CurrentClientType method. field(12; “Item No.”; Code[50]) { Caption = ‘Item No.’; DataClassification = CustomerContent; trigger OnValidate() begin if… Continue Reading thatnavguy’s Article...

Read More
Docker Desktop Failed to Initialize
Aug16

Docker Desktop Failed to Initialize

After updating the Docker Desktop to the latest version successfully, the docker was acting up and refused to start up. To fix this issue, try to delete below folders. %USERPROFILE%AppDataLocalDocker%USERPROFILE%AppDataRoamingDocker%USERPROFILE%AppDataRoamingDocker Desktop Once deleted, you should be able to start Docker Desktop as normal. If the docker is stuck at… Continue Reading thatnavguy’s Article on their blog...

Read More
Quickly Navigate to a File in VS Code
Aug12

Quickly Navigate to a File in VS Code

If you are working with hundreds of files in VS Code, you can easily navigate to that file by using “Ctrl + P” (Quick Open) and start typing in the file that you are looking for. Ctrl + P If you want to navigate between all currently opened files in an editor group, Hold Ctrl and press Tab to switch between it. Hold Ctrl + Press Tab Extra tip: You can also use @ to access the file… Continue Reading thatnavguy’s...

Read More
Add Total Page Number to Report
Aug05

Add Total Page Number to Report

To add total page number into RDLC report, you can use =Globals!TotalPages on the textbox. If you want to reset the Total Page, for example when you print a new Document No., you can set the ResetPageNumber to True under the PageBreak properties. Using Report Builder Using Visual Studio Code __ATA.cmd.push(function() { __ATA.initDynamicSlot({ id:… Continue Reading thatnavguy’s Article on their blog Add Total Page Number to...

Read More
Batch Export All Item Pictures to a Zip File
Jul21

Batch Export All Item Pictures to a Zip File

Item Pictures If you want to export Item Picture into a file, you can use below code: DownloadFromStream(FileInStream, ”, ”, ”, FileName);  However, if you try to export multiple pictures, BC will only export the last picture. This is an issue which I hope Microsoft will address in the future. The workaround is to compress it into a zip file using Data Compression… Continue Reading thatnavguy’s Article on...

Read More
Get Started CheckList
Jul06

Get Started CheckList

When you updated your Business Central to 18.1, as part of “Onboarding Experience”, you will now get this “Get Started Checklist” showing up for all users in every company. Every user with Business Manager role center can see the checklist and goes through the steps which can cause issue on the existing configurations. You can skip every steps to make it go away, however, every user… Continue Reading...

Read More
Dampener Quantity
Jun27

Dampener Quantity

On the Item Card, there is a field called Dampener Quantity. What is that field and how to use it ? Microsoft Help describes it as a field to block insignificant change suggestions for an existing supply, if the change quantity is lower than the dampener quantity. The Dampener Quantity is used in relation to Requisition Worksheet or Planning Worksheet. BC is designed with the concept of… Continue Reading thatnavguy’s...

Read More
Business Central IWs License
Jun03

Business Central IWs License

What is IWs license? When assigning Business Central license to the users, you will notice that you have Dynamics 365 Business Central for IWs. What is it and why do you have 10000 of it ? IWs is a demo license / free evaluation license. When you signup for Business Central trial using the self-service sign-up, 10000 IWs licenses are added to your Azure AD. It allows you to assign… Continue Reading thatnavguy’s Article on...

Read More
Using Device License in BC
Apr28

Using Device License in BC

The Dynamics 365 Business Central Device license allows multiple users to simultaneously use a device that is covered by the license. For example, this might be a point of sales, shop floor, or warehouse device. The number of users assigned to the Dynamics 365 Business Central Device Users group can sign in at the same time using device license. Before you set this up, make sure… Continue Reading thatnavguy’s Article on...

Read More
Permission Set Object
Apr20

Permission Set Object

Starting from BC18 (2021 Wave 1), we can use Permission Set Object to write our app permission set. You can still use the XML permission, but we now have option to use Permission Set Object. So much easier, simpler to use. Hello Permission Set Object You can even extend an existing permission set. How good is that ? But there’s more than that. You can even split and join multiple… Continue Reading thatnavguy’s...

Read More
Set Default User Group
Mar23

Set Default User Group

When you get new users in Business Central, BC will automatically assign you the User Group automatically. What if you want to change the default user group ? There is no official way to do this, but there is a trick to do it in BC. The table responsible for it is Table 9007 – User Group Plan. BC assign the default user group based on the user license / plan (essential, premium,… Continue Reading thatnavguy’s Article...

Read More
Looping Through Enum
Mar11

Looping Through Enum

Sometimes you may need to loop through Enum. To do this, you can use List Data Type. local procedure EnumLoop() var MyEnum: Enum "My Enum"; EnumIndex: List of [Integer]; iMax, iLoop : Integer; begin EnumIndex := ScanSource.Ordinals(); iMax := EnumIndex.Count(); If iMax <= 0 then exit; iLoop := 1; repeat //loop here MyEnum :=… Continue Reading thatnavguy’s Article on their blog...

Read More