How to gain more control on setup while posting transaction in business central.

With the release of Business Central Wave 2 2021 aka BCV19 lot of new features has been added to make life easier of developer and/or customers.

One of the important areas in business central is posting group which connect different module with finance management and user can see required values in chart of account after posting the transaction in actual time.

Sometime it happens user or consultant forget to set up required accounts in general posting setup and it pops up the error when posting an transaction. If you are experienced consultant then you will catch that immediately and add the required setup but if you are end user or beginner then you may need to juggle around the find the correct setup.

With the new release of business central while posting an transaction if some setup are missing then you will get proper error messages stating that this particular setup is missing.

Lets see how it works in real world scenario.

Removed the Sales Account from Posting Setup as below

Try to post Sales Order.

After Posting it throws an meaningful error message .

If you look at the error message it give more insight for the missing setup

Error Description This shows proper error description as follows and inform user where is the problem

Context This provides information regarding transaction line and once you click on that it will navigate to required lines and from there you can view the document.

Source and Source Field Name This shows the source where in we need to correct the setup

Once you click on the source it will navigate to required setup page as below

Support URL This will navigate to Microsoft docs for more information

Error Call Stack .This will provide the information to developer to check from where this error pops up.

Hope this will help and keep user happy.

Stay tuned for more.

How to get insights for Error Message in business central

With the release of Business Central Wave 2 2021 aka BCV19 lot of new features has been added to make life easier of developer and/or customers.

Whenever there is an error from application and if we need to have help from partner or MS then we need to have detailed information about that error and prior to BC V19 we need to collect those information from different sources.

In BC V19 now we have detailed information regarding the error pops up on application.

To test this new feature build one action button as below

Once I click on this I got an error message as below

Now this error message can be expanded to see more details.

If you look at the above error message it provide technical information such as session id and Error description.

There is one more option is provided on that page is Copy to clipboard and once you click on that it will give more information of that error message as below.

Testing Error Info from BC V19

Internal session id: 
7db83f72-079e-4aef-b2e0-acbac56556a2

Application Insights session id: 
1d111e29-aeaf-42d3-bc7c-f4c56b306249

Client activity id: 
d5ae47d2-2582-46e1-bcd0-8aab7ffd0223

Timestamp: 
2021-10-05T02:57:39.9079548Z

AL call stack: 
DataErrorTest(PageExtension 50101)."ErrorDetail - OnAction"(Trigger) line 2 - ALProject2 by Default publisher

In copied message it provide more information line AL Call stack, Timestamp etc. Basically I like the feature of showing AL call stack which will helpful to trace the exact location from errors is pops up.

This feature is not available for error message showing by using TestField function

Hope this will help

Stay tuned for more.