With the rollout of Business Central 24.2 we have a new journal and ledger entry record, the Sustainability Journal and Ledger. While the regulatory and accounting impact of this feature is a discussion best left for the accounting and compliance folk, it is a great opportunity to look at API documentation and how we can take advantage of this new feature.

Let’s start with the Microsoft Learn entry for the Sustainability API.

Sustainability API – Business Central | Microsoft Learn

A REST API is typically broken down into four verbs, GET, POST, DELETE, and PATCH. GET retrieves records, POST adds new records, DELETE deletes records, and PATCH updates records.

We can see that there are several API’s mirroring the records associated with the accounting processes. Here is the Sustainability Journal Line record, and we can see that it supports all four of our verbs.

Some of the verbs accept and return a data type, in this case a Sustainability Journal Line object. The documentation lists out all the values and the types we expect to use to transact with this record.

The great thing is that because the API has a GET verb, we can connect to it directly in Power BI and begin reporting.

Here we can see all the GET end points that are documented in the API. We can now collect and report against the sustainability data available in the environment. I’m on a sandbox with no good data in it, but you can see the columns available match what we see in the API documentation for the sustainabilityJournalLine.

Because it has a POST verb, we can create Power Apps that communicate and allow for data entry into the API.

We could even go so far as to connect a fleet of vehicles to GPS loggers and CAN Bus readers and report daily mileage and fuel consumption automatically to Business Central through Azure Logic Apps / Azure Functions.

SparkFun Thing Plus – ESP32-S2 WROOM – WRL-17743 – SparkFun Electronics

SparkFun GPS Breakout – XA1110 (Qwiic) – GPS-14414 – SparkFun Electronics

SparkFun Qwiic OpenLog – DEV-15164 – SparkFun Electronics

SparkFun is not a sponsor, I’ve just purchased so much stuff from them over the years that it is easy to find what I need on their website.

It is enough cool stuff to ruffle my lab coat!

While the introduction of a new Journal and Ledger entry doesn’t add any new development features, it does provide new development opportunities for new and exciting projects. It is also offered a great opportunity to look at how we decipher the documentation to use the API.

Leave a comment

Trending