Skip to main content

Posts

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 current company. Because of this if the No.…
Recent posts

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 DVDAPI(V1.0) for Business Central (Click Here)API(Beta) for Business Central (Click Here)
Solution:

Key Requirements:
API source table must have an Id(GUID) field per record for m…

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 for Test Tool in Business Cen…

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.
Note that Extensible means that the Enum Object can be extended in another module. By default, this property is set to TRUE.



Enums and Enum Extensions behave differently. They follow a different number se…

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 regards to Sandbox Upgradation but I didn…

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 the Dashboard i.e OnOpenPage Tr…

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 Management module where it w…

Managing with Multiple Legal Entity Data in Microsoft Dynamics NAV / Business Central

Problem Statement:
Well, my client is a Trader of Oils & Fatty Acids and has multiple legal entities to perform various sets of operation on the TRUCK-LOAD(a.k.a. Load). One legal entity creates the Load and schedules it, while another manages with the freight requirements. The information is not shared between both the legal entities. Thus, we need to store the data separately.

Pre-requisites:
For Microsoft Dynamics NAV:
- C/Side Development Environment
- Multiple legal entity(Company) setup

For Microsoft Dynamics Business Central:
- Visual Studio Code
- AL Language Extension
- Multiple legal entity(Company) setup

Solution Design:
1. Create two Tables say LoadCompany1 and LoadCompany2 with same fields
2. Set DataPerCompany property is to TRUE on both the tables.
3. In NAV/ BC, there are common tables but the data into the tables are different. Thus, the system has to manage different version for a single table based on an entity that you're currently working on.
In this case, I n…