Skip to main content

Posts

Workaround to XMLPort not supported in Business Central

Problem Statement : While I was working on some custom EFT project, I thought of using XMLPort as it is the safest and easiest method to get the data successfully directly from the tables. Unfortunately, XMLPort is not supported to work on WebClient and I was stuck with writing code to do exactly what XMLPort would do. Also, another issue that Business Central d extension support is using File methods i.e Open, Write, Close, etc. Introduction : In Business Central even if you're not given explicit rights to deal with files directly there are streams using which we can be downloaded as files. Enough of introduction, let's start working now! Books & References: https://docs.microsoft.com/en-us/dynamics-nav/feature-limitations-of-the-microsoft-dynamics-nav-web-client Pre-requisites : VS Code AL Language Extension Microsoft Dynamics Business Central. Demonstration : 1. Creation of File Contents: In this case, I've simply text string 'Hello

Generate Number Series from one Company and use it in another company

Introduction: When dealing with Number Series where the Intercompany Documents are created automatically using the code, using standard number series generation Codeunits cause problems. In this blog, I'll be explaining why this issue is caused and how to resolve such issues. Pre-requisites: Microsoft Dynamics NAV / Business Central  VS Code  AL Language Extension Solution: Issue: Let's say I'm logged in as user of Company B. When I create Sales Order in current company, I need to create Purchase Order in target company say Company A. When I use the Number Series declared on Company B's Purchase and Payable Setup for Purchase Order, the system either gives an error that Number Series does not exist or number generated is out of sync as Number Series are stored on Per Company basis. This results in overlapping of next PO number to be generated. Cause of the Issue: NoSeriesManagement Codeunit 396 works only with the No. Series for the cu

Creating APIs in Business Central - 1

Introduction: While writing a blog on Automated Testing in Business Central, I was going through sample apps provided by Microsoft and realized that the complexity is nowhere close to what examples Microsoft has provided on docs.microsoft.com. In this blog, I will try to explain how APIs work and how to be creative with the implementation. Also, an API which were in beta are finally out with version V1.0 in the April 2019 release let's see some important key things from development aspects. This blog is going to be theoretical one kindly bear with me. Pre-requisites: Microsoft Dynamics Business Central (SaaS) VS Code( https://code.visualstudio.com/download ) AL Language Extension( https://tinyurl.com/yyvzxwkb ) API V1 from Business Central On-Premise DVD Books & References: API V1 from Business Central On-Premise DVD API(V1.0) for Business Central ( Click Here ) API(Beta) for Business Central ( Click Here ) Solution: Key Requirements: API source table

Test Toolkit in Business Central(SaaS) - How to setup and execute Custom Test Cases

Introduction: Test Automation is basically writing code to test and verify whether the application functionality developed works as expected. When you install NAV / Business Central - OnPremise, the installation folder consists of standard Test Toolkit Objects which are to be imported manually if you want to enable Test Automation in your project. But, for Business Central (SaaS) it comes pre-installed.  Let us see how Test Automation is done in Business Central(SaaS) with the help of Test Toolkit and how to set up your own test cases for the customization you've developed for the system. Books & Reference: 1. Automated Testing in Microsoft Dynamics 365 Business Central (https://tinyurl.com/y3zpy27p) Pre-requisites: Microsoft Dynamics Business Central (SaaS) VS Code( https://code.visualstudio.com/download ) AL Language Extension( https://tinyurl.com/yyvzxwkb ) Demonstration: 1. Checking the installed Test Toolkit in Business Central(SaaS): When searching

Enum Object in Business Central - How to create and how to extend!

Introduction: Since the dawn of Business Central Era (2nd April 2018 - Today), there are many new data types introduced by Microsoft. One such data type is Enum(Enumeration). Essentially, what enumeration is having a single select value with multiple options at a given time! Well, I know what your thinking what about the 'Option' data type. Anyways, enough of talking let's just dive in! Disclaimer:   The knowledge in this blog is true and complete to the best of authors and publishers knowledge. The author and publisher disclaim any liability in connection with the use of this information. Pre-requisites: Microsoft Dynamics Business Central (SaaS or On-Premise) VS code with AL Language extension Code: 1. Enum as an Object: Just like Tables and Pages, Enum behaves like an Object. Enum Object Note that Extensible means that the Enum Object can be extended in another module. By default, this property is set to TRUE. Enums created in a module(App), ca

Admin Center for Microsoft Dynamics Business Central (SaaS)

Introduction: What is Admin Center in Business Central on Cloud? How to use it and what are the implications? Admin Center is one of the newest features of Business Central On Cloud. Here, you can manage your environments and performs tasks related to your environment. Demonstration: To goto Admin Centre, visit the URL https://businesscentral.dynamics.com/<TENANTID>admin To visit the Admin Centre you should have the Global Administrator permission in Office 365. Environments: Here you can see a list of Environments. You cannot Create to Delete the production environment. Only you can Create or Delete Sandbox Environments. Viewing details of the Environment:  Click on the Environment Name Upgrade Settings: You can set the Time to auto upgrade your Tenant Environment. Copying of Production on Sandbox: Notification Recipient: Notification Recipient is a person to notify in case there are some things to notify the user about. I thought it was with

Role Center(Dashboard) taking forever to Load? Let's find out why and how to optimize!

Introduction: Have you ever faced the issue of the Dashboard taking forever to load? If yes, then did you inspect the reason why? Anyways, the Dashboard loading times dependent upon the calculations used to generate the figures on each of the dashboard tile. Most of the times the calculations are so tedious that the results involve querying multiple tables with multiple filters. Let's see how we can optimize the Dashboard load times. Pre-requisites: Microsoft Dynamics NAV / Business Central. Development Environment or NAV. VS code with AL Language Extension for Business Central. Solution: 1. Figuring out which all tiles required real-time calculations VS non- real-time. Thus, by separating real-time from non- real-time, we can differentiate the execution patterns. For eg: No. of Open Invoices VS Average Cost of an Open Invoice. 2. Settings different execution styles for Real-Time and Non-Realtime: i. Real-Time Calculations are trigger whenever we open t

Temporary fix to 'Your program License doesn't permit support maximum N non-demonstration companies'

Introduction: While I was testing InterCompany Setup, I faced an issue probably a limitation of the CRONUS standard license which comes with standard NAV/ BC On-Premise installations. Whenever I created new multiple Companies in NAV, I got an error ' Your program License doesn't permit support maximum N non-demonstration companies '. Pre-requisites: Microsoft Dynamics NAV 2018. Microsoft Dynamics 365 Business Central. Solution: I faced this error when I restarted NAV Client after creating a non-evaluation company. Thus, I cannot remove the company from front-end. I tried using Microsoft Documentation and found that it was actually possible (YAY!! 😁). Refer  https://docs.microsoft.com/en-us/dynamics-nav/how-to--delete-companies . Instead, it kept ruining things more. The Server Instance would stop without any errors and NAV Windows Client would infinitely work trying to connect to the workspace. Finally, I found that using Windows Powershell with NAV Manag