Add, Add by Dimension, Add by Filter, Add Related Entries, Analysis Views, BC18, Business Central, Change, Combinations, Completed, Correction, Correction Setup, Delete, Dimension, Dimension Corrections, Draft, Dynamics 365, Functional Tips, G/L Entries, G/L Register, General Ledger Entries, History, How To, Information, Modify, Posted General Journal, Reversing, Run, Schedule, Select Manually, Tip & Tricks, Trace, Undo, Updating, Validate, What's New

How can we Correct Dimension in Microsoft Dynamics 365 Business Central?

You can do correction by reversing the journal or creating a credit memo for the document, which will be time consuming and can attract to even more errors.

Now you can correct dimensions for general ledger (G/L) entries to ensure your financial reports is providing you with accurate insights. For G/L entries, you can now

  • change the dimension values
  • add new dimensions
  • remove wrong ones

You can also trace a history of the corrections that you have done and can undo corrections in case you had made a mistake in the corrections itself.

Before you continue let me remind you:

Although the Dimension Correction feature only updates general ledger entries, still it can be helpful in many cases with creating accurate financial reports.

You must decide when to use the corrections because when you perform correction, it will result in differences between the dimensions in finance and sub-ledgers. The earlier you decide on what corrections to use, the less manual corrections you’ll need to do in the future.

I am using BC18 Demo database.

 How to run the Dimension Correction

General Ledger Entries. You can change the dimensions for single or multiple entries just by selecting the entries.

G/L Register. You can change the dimension per batch posting. By using “From Entry No.”, “To Entry No.” as a filter for General Ledger Entries.

Posted General Journal. You can use “Document No.” and “Posting Date” as filters for General Ledger Entries.

Search for Dimension Corrections Page.

Draft Dimension Correction Screen:

Depending upon from where you Launched the Dimension Correction, it may come with pre-filled or as blank screen.

You have several options to work with dimensions:

  • You can Add New Dimensions
  • You can Remove existing Dimensions
  • You can Change the existing Dimensions

For Selecting Entries to which above changes applies you have different options to work with.

  • Add related entries. This requires at least 1 G/L Entry already to be selected, and then it adds all other G/L Entries with the same “Transaction No”.
  • Select Manually. You can manually select in the G/L Entries by just choosing them.
  • Add by Filter. Here you have all freedom of choice, how to filter your G/L Entries for the dimension corrections.
  • Add by Dimension. This can be useful if you want to change the dimension value Sales to Admin for all G/L entries. So, you find all G/L Entries with the Dimension Sales.

You can omit/remove selected entries, or change selection criteria for your entries to be applied with changes.

Updating Dimension Values

Above we create a Dimension Correction, the Status is initially DRAFT, it means the G/L Entries Dimension is NOT yet updated.

Once you are done in the Dimension change to move forward you have two option to go thru:

  • Click the Validate dimension change then click RUN.
  • Click RUN.

Validate change

This will check if it’s possible to make the dimension changes you specified.

  • Check Dimension Correction Setup.
  • Check Dimension Combinations.

Once the validation run successfully you can see it in the Validation status.

You can choose to run the job immediately or schedule in case you are operating on larger data set.

Next you can now use the Run action button. This will Apply changes to the General Ledger Entry Dimensions.

How to trace the correction

General Ledger Entries. You can see all the dimension corrections that you’ve done for the selected entries.

Search the Dimension Corrections. You can see all the Dimension corrections that you’ve done even the ongoing dimension corrections will be listed here.

Undo a Correction


In the dimension correction page just click the UNDO. This will be executed as a Job. The user will have to choose, how he wants to apply changes: running the job immediately or schedule it.

It is recommended to run the schedule if you are working with larger data set, to avoid the table locking during posting of other transactions.

Once the Job execution completes, you will see the status change to UNDO COMPLETED.

How to Update the Analysis Views

From the Dimension Correction page, you can also update you’re Analysis Views by clicking the Update Analysis Views button. This will be executed as a Job. You will have to choose, how you want to apply changes: running the job immediately or schedule it.

It is recommended to run the schedule if you are working with larger dataset, to avoid the table locking during posting of other transactions.

Hope you enjoyed the information. Will come with more similar information in my next posts. Till then keep exploring, learning and sharing your knowledge with others.

Remain safe, take care of your loved ones, put your mask, maintain safe distance and don’t forget to get vaccinated.

AL, API, Business Central, Development Tips, Extension Package, How To, Information, JSON, Modern Development Tool, OData, Tip & Tricks, V2, Visual Studio Code, What's New

API – Business Central Part-2

In our previous post we saw basics of API in Navision. Let’s explore further.

If you missed the earlier post you can find here API – Business Central Part-1

Continuing from where we left in previous post.

Someone asked me why we require API when we have web service in place and can achieve same OData either query or filter in same fashion.

So what I am going to explain below will answer to that query.

The API will generate a REST service which returns OData.  The API is not the same as the OData web services that we discussed in our earlier post.

There we created an OData web service based on a card page.  If there were fields that need to be displayed on a card in the client application but you do not want those fields to expose in the OData web service, you will have to create a second card page to solve this problem.  In this case, we create a separate page for our API and only for the API.  This page cannot be requested in the client application.  It’s also much better concept to separate them from the regular pages.

Also we can apply templates for default value of field, which we will discuss later in below post.

Let’s start with creating our own API.

Each resource is uniquely identified through an ID. As discussed in our earlier post. So let’s start with this, I will start with my earlier created Table LoadoutPoint and add one field ID.

api009

Any new entry in my table will have a unique ID for Loadout Point, so I have added code in OnInsert trigger of the table.

api010

To create an API, you should create a page of type API, instead of a card page or list page.

Use tpage, Page for type API snippet for page structure. You get all the bare minimum properties to be added for API Page.

api011

Then you have to define which fields you would like to include.

api012

Some important rules to be followed for API Pages:

  • Fields should be named in the APIs supported format, Any Captions cannot have spaces and special characters. Only AlphaNumeric values permitted.
  • When you insert an entity through API endpoint, Business Central don’t run OnInsert trigger on the table.
  • And we have assigned the ID for the new record there. So Add Insert(true) for OnInsert Trigger.
  • Add business logic to Modify trigger. As external user can change values through API, even the value of the primary key field.
  • Add Delete(true) for On Delete trigger. The reason same as above.

So let’s add these 3 trigger in our page too.

api013

Ok so now we have modified Table and Created new API page, now it’s time to publish our app/extension.

Use command palette to publish your app.

Now it’s time to test, let’s access our API page from client and do setup for same.

Search for API Setup Page in the client.

api014

You can define and assign your Template from Template Code field, check with available same Templates how to do it.

api015

Also the conditions when this Template should apply as discussed in earlier post also.

Now let’s access the API from outside the Navision/ Business Central.

I will use Postman to test this.

To get the list of 44 standard APIs.

https://KSD-DESKTOP:7748/BC130/api/beta/

api016

To get the list of custom APIs.

https://ksd-desktop:7748/BC130/api/ksdconsultancy/app1/v1.0/

Hope you remember when we created API page we assigned few Properties like

APIPublisher = ksdconsultancy, APIGroup = app1, APIVersion = v1.0.

Now we will use those values to access my custom APIs.

See the url those are included after /api/

api017

All information is available in JSON format and further can be confirmed that there are 1000 records. Thus, the number of records integrated here depends on the Max Page Size parameter setup in Navision Server.

What else you can do with APIs:

  • Get to fetch or List
  • Post to insert records
  • Patch to modify records
  • Delete to Delete records
  • And so on.
  • You can extend existing API Pages too, I have yet not tried.

That we may discuss in some other post. Not to complicate this topic more for now I conclude this post here.

Will come up with more details in my upcoming posts, till then keep exploring, learning and take good care of yourself.