Warning: Undefined array key "Play" in /homepages/7/d756825262/htdocs/clickandbuilds/365Community/wp-content/themes/Nexus/epanel/custom_functions.php on line 1812

Warning: Trying to access array offset on value of type null in /homepages/7/d756825262/htdocs/clickandbuilds/365Community/wp-content/themes/Nexus/epanel/custom_functions.php on line 1812

Warning: Undefined array key "Play" in /homepages/7/d756825262/htdocs/clickandbuilds/365Community/wp-content/themes/Nexus/epanel/custom_functions.php on line 1826

Warning: Trying to access array offset on value of type null in /homepages/7/d756825262/htdocs/clickandbuilds/365Community/wp-content/themes/Nexus/epanel/custom_functions.php on line 1826
Teddy, Author at 365 Community

D365 Business Central : Suggest Account on General Posting Setup

Have you ever found yourself scratching your head over the Suggest Account feature in the General Posting Setup? The tooltip only gives us a brief description, stating “Suggest G/L Accounts for selected setup.”. But what exactly does that mean? In this article, let’s dive into the code behind the General Posting Setup table to gain a better understanding on how this feature works.

Read More

D365 Business Central : Persistent Blob

Lots of people have heard about TempBlob, but what about Persistent Blob? Persistent Blob is a table in System App that can be used to store Blob data. Instead of creating and mixing up Blob field in our table, we can have a centralized blob table using Persistent Blob table. The table consists only two fields: Primary Key (Big Integer) and Blob. The Primary Key is using AutoIncrement… Continue Reading thatnavguy’s Article...

Read More

D365 Business Central : StringConversionManagement Codeunit

There are lots of Management Codeunit in D365 Business Central. Let us talk about one of them which is StringConversionManagement Codeunit. There are currently four procedures in this Codeunit that you can call:– WindowsToASCII– GetPaddedString– RemoveDecimalFromString– RemoveNonAlphaNumericCharactersLet’s look at it one by one. WindowsToASCIIThis procedure is used to convert text into… Continue...

Read More

Azure : Using Logic Apps to Monitor Azure App Registration Expiration

When we switched to use OAuth2 authentication, we now need to create Azure AD App Registration with expiration date. The client secret expiration date can only be set to maximum of 24 months. We cannot set a client secret that will never expire due to security reason. Unfortunately, Azure currently does not natively provide a way to notify expired client secret. An expired secret can cause… Continue Reading thatnavguy’s...

Read More

D365 Business Central : Lazy Evaluation

Hi and Happy New Year 2023 !! For the start of the year, let us talk about Lazy Evaluation. What is Lazy Evaluation ? If you have never heard of lazy evaluation, it is basically a technique where the compiler do not process an expression until it’s needed. What does that mean ? Let’s take a look at example in AL conditional statements. if <Condition1> and <Condition2> then … Continue Reading...

Read More
D365 Business Central : Test OAuth2 Connection
Dec23

D365 Business Central : Test OAuth2 Connection

Last time we talked about how to setup OAuth2 to connect to Business Central API. This time, let’s talk about how to test the connection. We will use two methods: Postman and REST Client. Postman We are going to use below URL to test. We are going to put it under URL. https://api.businesscentral.dynamics.com/v2.0/Sandbox/api/v2.0/companies Let’s start by setting up the… Continue Reading thatnavguy’s Article on...

Read More
D365 Business Central : Setup OAuth2 Authentication
Dec21

D365 Business Central : Setup OAuth2 Authentication

We need to use OAuth2 when we want to connect to Business Central API. In this post, I would like to talk about how to setup OAuth2 authentication. OAuth 2.0 (Open Authorization) is a standard authorization protocol designed to allow a website or application to access resources hosted by other web apps on behalf of a user. There are basically two things that we need to do to set it up:… Continue Reading thatnavguy’s...

Read More
Azure : Deploy Diagnostic Settings using Bicep
Dec15

Azure : Deploy Diagnostic Settings using Bicep

Azure Diagnostic Settings is used to send Azure resource’s platform logs and metrics to the destination of your choice. We can use this to connect a resource to a Log Analytics Workspace for log gathering. We can add the Diagnostic Settings manually under each resource. The challenge is that when we try to do export template, the diagnostic settings is not included in the template. It’s… Continue Reading...

Read More
D365 Business Central : Using Service-to-Service (S2S) Authentication with Job Queue
Dec06

D365 Business Central : Using Service-to-Service (S2S) Authentication with Job Queue

Minor update 21.2 for Business Central 2022 release wave 2 has just been released. You can check the release update here. It’s a minor update, but one of the most important part is that the integrated session using service-to-service (S2S) authentication can now schedule tasks. This is great news for people who are dealing with integration. Prior to the update, scheduled tasks must be… Continue Reading thatnavguy’s...

Read More
D365 Business Central : Support global and workspace launch configuration
Nov20

D365 Business Central : Support global and workspace launch configuration

The new AL version 10.1 was released recently. One of the new feature is the support for global and workspace launch configuration. It’s a small interesting new feature and worth mentioning. AL developers are now able to add a launch property to their code-workspace or settings.json file and it will be taken into account. A local launch.json file overrides the workspace and global… Continue Reading thatnavguy’s...

Read More
D365 Business Central : New Company Badge in BC21
Oct27

D365 Business Central : New Company Badge in BC21

Company Badge is a great way to quickly identify the company that you are currently working with. The badge is helpful especially when you are working with multiple tabs and multiple companies at the same time. The badge is displayed on any pages and is very easy to identify. Before BC21, you will see this as a rectangle on the top right corner. You can only use 4 characters on the… Continue Reading thatnavguy’s Article on...

Read More
PowerShell : List of Available Colors
Oct21

PowerShell : List of Available Colors

Colors are great and powerful way to get your attention. Good color helps us better understand at a glance the information being displayed so we can act on that information more quickly and effectively. When using powershell, we can make use of the color when we display the information. To list up all possible colors available, we can make use of… Continue Reading thatnavguy’s Article on their blog PowerShell : List of...

Read More
D365 Business Central : Removing All Web Service Access Keys
Oct10

D365 Business Central : Removing All Web Service Access Keys

Since October 1st 2022, Web Service Access Key is no longer working and you will need to switch to OAuth. If you are still using Web Service Access Key, the following message is displayed when you login to Business Central. Even if you already switched to OAuth, you can still get the message. This warning notification will still pop up as long as there is at least one user making a… Continue Reading thatnavguy’s Article on...

Read More
D365 Business Central : Adding Total to Sales Order Page
Oct07

D365 Business Central : Adding Total to Sales Order Page

If you look at the Sales Order page, you can see that there are total fields under the Lines section. I recently had a request to add another total field to it, such as Quantity. To do this, we can easily subscribe to the Document Totals codeunit. The Document Totals codeunit is used to calculate total on sales and purchase documents. Let’s try to subscribe to the… Continue Reading thatnavguy’s Article on their blog...

Read More
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