Skip to main content

Posts

Showing posts from 2019

How to use Forms - Flows - Business Central integration to build your masters in Business Central

Problem Statement: Few months ago on a client requirement gathering session for Business Central, I realized that the client is asking for portal where the Vendors / Customers can fill in their basic data so that the data is correct and it saves our time to prepare the master.  The easiest way of doing this was by using Microsoft Forms. In this case, I need it for Vendors, so let's see how we can use Forms, Flow and Business Central and integrate them together.

Pre- Requisites:
Microsoft Flow
Microsoft Office Forms
Microsoft Dynamics Business Central

Solution:
The solution I found was creating Form and using Flow integrate the data from the Form into Business Central
1. Create Form with fields which you want to set on the Vendors



2. Create Flow to take each record inserted in Form and integrate this record to Business Central



Output:
After inserting the data into Forms, automatically MS Flow runs to integrate this record into Business Central.





Conclusion:
Thus using MS forms, you can on…

Automatically adding dimensions from Shortcut Dimension from Excel Import in Microsoft Dynamics NAV / Business Central

Problem Statement:
I have a requirement where the contents of the General Journals are to export to Excel and also can create new entries by importing the same Excel file as well.
A major troublemaker is the dimensions as only Dimensions 1&2 ate stored in tables and can be validated easily but 3-8 are set at run-time through variables on the page.
In this blog, I'll be attempting to resolve how to automatically apply dimensions from 3-8 using the code.

Pre-requisites:
VS CodeAL Language ExtensionFunctional knowledge of  DimensionsMicrosoft Dynamics NAV /  Business Central
Solution:
1. Understanding how dimensions work technically:
Any dimensions that are inserted in an entry in the system are validated to be stored in the Dimension Set Entries table.
This Dimension Set Entry ID is stored on the entries to be used as a reference. For instance, if we want to Apply Dimensions to General Journal Entries, the Dimension Set Entries ID is stored on General Journal Lines Table.


Out of 8 t…

Adding Default / Mandatory Dimensions in Dynamics NAV / Business Central

Introduction:
In this blog I aim to provide how to set Mandatory Dimensions on Items,Customers, Vendors and G/L Accounts and how to optimize this process using Configuration package.


Pre-requisites:
Microsoft Dynamics NAV.
Microsoft Dynamics Business Central.
Understanding of Dimensions in NAV / BC

Theory:
Automatic Dimensions can be added for the G/L Accounts, Customers, Vendor and Items.
The Value Posting can be selected as per the below Table.

Value PostingExplanationBlankNo posting restriction.Transactions can be posted with any dimension value or without a dimension value.Code MandatoryAny dimension value for the given dimension can be added. If dimension value is blank then NAV / BC will throw an errorSame CodeOnly a single dimension value defined in Default Dimension can be used while posting.No Code
Dimensions must not be specified on the transactions. This also implies that you can add the Default Dimension, No Dimension, Mandatory Dimension and Manual Dimension only when needed…

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 CodeAL Language ExtensionMicrosoft Dynamics Business Central.
Demonstration:
1. Creation of File Contents:
In this case, I've simply text string 'Hello World!'
Although it's perfectly po…

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.…

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…