29 March 2023

Making the most of your ERP - Business Central for Operations

 Check out the blog post I wrote with the amazing Incremental marketing team: Making the most out of your ERP system » Incremental Group which I have re-produced below for posterity! 

Making the most out of … your ERP system

Introduction

This week we share the third blog in our series: ‘Making the most of the Microsoft technology stack’, showcasing the power of the Microsoft stack in delivering innovative, hybrid solutions to fit your organisation’s needs.

Making the most out of Dynamics 365 Business Central – a focus on operations

Every business needs to get value from its IT systems through better processing efficiency and improved data visibility, leading to better resource allocation and faster return on investment. For operations managers, this means staying on top of inventory, order fulfilment and customer service, whilst finding ways to streamline processes and enhance productivity.

Microsoft Dynamics 365 Business Central is a powerful cloud-based solution that offers a wide range of capabilities, from financial management and supply chain operations to project management and sales. With Dynamics 365 Business Central organisations can simplify and automate key business processes, gain insights into performance and make data-driven decisions.

The real power of Dynamics 365 Business Central lies in its integration with the rest of the Microsoft technology stack. By combining Dynamics 365 Business Central with other Microsoft tools and technologies, such as Power BIPower AppsTeams and Microsoft 365 (previously known as Office 365) apps, organisations can create a truly fit-for-purpose holistic system to meet their unique business needs.

We have shared below some key opportunities that can be created for operations managers using Dynamics 365 Business Central and Microsoft 365.

Opportunities for operations managers

Control business processes: Without a centralised system it can be difficult to keep track of inventory and orders. Dynamics 365 Business Central provides real-time insights and data across the operation, enabling you to make better decisions and keep your processes running smoothly. The Microsoft 365 toolkit adds even more functionality, such as SharePoint for document management and Power Automate to simplify repetitive tasks to prevent reliance on multiple spreadsheets as a critical business tool.

Figure 1 shows the use of a Power Automate flow, built from an out-of-the-box template to manage item approvals and keep control of the product catalogue. Figure 2 shows the powerful item availability by event, which allows you to review projected stock balances of items over time to better plan work and replenishment.

Figure 1: One of the many Power Automate templates available for use out-of-the-box ready to be adapted to your needs. This flow manages the approval of new ‘Items’ (goods to be bought and sold) being added to the system.

Figure 2: Real-time ‘Item Availability’, showing future events with the option to include demand forecasts and planning suggestions.

Improve inventory management: Keeping track of inventory, managing procurement and preventing stockouts can be a timely and inefficient process without the right tools. Dynamics 365 Business Central provides a single system for all inventory and orders, enabling you to monitor stock levels and set up reorder points to ensure you always have the right amount of stock on hand. With Power BI, you can visualise your inventory data, forecast demand and optimise your inventory levels for maximum efficiency. Figure 3 shows the Requisition Worksheet, a powerful tool that can be used to plan and replan replenishment of stocks across all locations. In the example below, the system is cancelling an unnecessary purchase and re-planning the purchases on different days from a different vendor to get the best price. Figure 4 shows one of the template Power BI dashboards available from AppSource, which can be connected to your system and used right away or used as a basis for your own dashboards. Full guidance is provided on setting up bespoke Power BI reports on Microsoft’s Learn portal.

Figure 3: The ‘Requisition Worksheet’ simplifies the creation of replenishment orders across all items, selecting the lowest price vendor and applying re-ordering rules set up per stock-keeping unit.

Figure 4: An out-of-the-box Power BI report showing a dashboard of item sales. This template Power BI app is available for free from AppSource

Simplify order fulfilment: Delayed or inaccurate order fulfilment can lead to unhappy customers and lost revenue. Dynamics 365 Business Central helps you manage orders from start to finish, from sales quotes and orders to shipping and invoicing. The Microsoft 365 toolbox adds even more functionality, such as Teams for collaboration and communication and Power Automate for automated order processing. Overdue documents can be used to trigger Power Automate Flows and post reminders to internal teams. Power Virtual Agents can help provide enhanced self-service to customers who may wish to enquire about their order status or stock of a particular item.

Figure 5 shows a list of stock-keeping units surfaced in a Teams channel. One of the huge benefits of Dynamics 365 Business Central is that lists and pages can be shared this way with all users in your organisation who have access to Teams, simply with a standard M365 license.

Figure 5: A Teams channel showing content from Dynamics 365 Business Central. Content can be surfaced directly in Teams enabling wider circulation and visibility of operational data without the need for additional Dynamics 365 Business Central licenses.

Figure 6: Power Automate can post adaptive cards to Teams – with summary information and a link to the record. Furthermore, the documents can be worked on directly in Teams, by Business Central users, allowing real-time collaboration.

Figure 7: Sales order list page, showing requested delivery dates, order status and shipping status.

Exploit data-driven insights: Without all your relevant data in the right place it can be hard to generate insights and make informed decisions to optimise operations. Dynamics 365 Business Central provides real-time insights and data across your business operations, enabling you to make data-driven decisions and keep your processes running smoothly. The Microsoft 365 stack adds even more functionality, such as Power BI for advanced data analytics and Power Apps for custom app creation to help create a fully bespoke solution for the needs of your business.

Figure 8: An out-of-the-box Power BI report looking at financial and operational KPI data in real-time. This template Power BI app is available for free from AppSource.

Get the most out of Dynamics 365 Business Central

Dynamics 365 Business Central paired with Microsoft 365 and the Power Platform can provide operations managers with a range of tools to empower them to efficiently manage inventory, purchase orders and so much more. The opportunity to use real-time insights, data-driven decision making and automated workflows unlocks the potential for businesses to optimise their operations and achieve greater efficiency, productivity and profitability.


18 March 2023

Business Central & Power Automate - Post to teams / Post invoices

To make the most of Dynamics 365 Business Central you should invest some time to understand how Power Automate works. In this example I'll start off by simply connecting BC to teams with some flows.

Teams is especially handy alongside BC as regular business users (with a standard Microsoft 365 / Office 365 license) can view BC records posted to teams. This is pretty huge, as it means you can provide visibility of records across the whole business without also needing to have everyone setup as a licensed BC user. Just turn on access for M365 users:


With Power Automate you can setup action buttons to post to teams on demand or create "when a record changes" triggers to post if particular thing happens - that you want to notify a team about.

For these flows I'm going to focus on the use of adaptive cards also; as these specifically allow any user of teams to open the BC record in teams and take advantage of the "Access with M365 license" feature. Business Central Access with Microsoft 365 licences - Business Central | Microsoft Learn

Let's look at the "push a button" flow and see a few things we could do with that.

Create a new flow, pick the Instant cloud flow; Microsoft Power Automate


The name of the flow is what will show in BC as the menu action - so name it with that in mind! Pick the 'For selected record (V3)' trigger.



On the trigger, you can control which pages in BC the action will be available on. For this example I want my new "Post to teams" button to show up in the PRODUCTION environment;  Inventory Demo company and only on Page 42 - the Sales Order card page.

The rest of this very simple flow is the 'Get adaptive card (V3)' and then the 'Post card to chat or channel' actions:


That's it - so easy! Lets test:

Logged into Business Central, on a sales order card. I have used 'personalise' mode to move the action button to my home tab. All the flows that would apply to this page show can be found under the Automate action.


After access the new action the system will check your connections used in the flow:


 And then let you know if it worked or not:


Over in teams, here is our adaptive card:


The card was generated automatically and with the details button - the record opens inside teams. Full BC users can update the record, other staff with an M365 license can view the record.


Of course to simply do what I've done here you can also use the built in share to teams button, that will ask you where to share and post the message. 


With a power automate flow however you can setup any number of other steps to embed a process in the system. You can request input from the user upon running the flow; maybe a series of questions or extra info that you then post as additional text in the teams conversation.  

An ever greater opportunity for flows and business central is around the Automated cloud flow in combination with the "When a record is modified" trigger.


In this next example I want to post a card to teams when a sales order is "fully shipped". For this you need the 'When a record is modified'. This action gets the Row ID for any records that have been changed. You can then pass this row id into the "Get record (V3)" to get all the rest of the details. 

From the full record I'm looking at the "Fully Shipped" field and using that to drive the posting of the card to teams.  



  • For the conditions, the values passed by the API are not always what you might expect. For example in BC something that's fully shipped shows "Yes", whereas in the API data this shows as "true". If your conditions are not behaving as you want - check the full output of the "Get record" from a test run to see what you need to filter on:



Lets extend this even further and automate the posting of the sales order as soon as it becomes fully shipped - yes you can do that too!


The action is carried out in the name of the flow owner:

Posted G/L Registers



END

05 March 2023

To Validate or Not to Validate: Line validation in Dynamics 365 Business Central Documents

This is a short note on how to add further validation to the sales or purchase document lines in Dynamics 365 Business Central with a small AL code extension. 

There are a number of validations operating in the background for sales and purchase lines. Sometimes you need to add to this, in this example I'll build a small app to meet the following requirement.

  • Prevent sales lines with zero value

To meet this requirement I'll use the OnAfterInsert trigger which will carry out the checks after the system already validated at the database level.


Here is the example code:

Lets see what ChatGPT has to say about this

Pretty handy!

What if we want more? I asked to validate in a different way: "Please rewrite the code to also prevent the job and job task from being blank" 

Looks good, I liked the way it also updated the error message, very handy. Would need testing of course.

The original simple .app and code can be found here https://github.com/andywingate/d365bc-validatesalesline

25 February 2023

Yellow Excel or: How I Learned to stop worrying and Love PowerBI for Dynamics 365 BC with help from ChatGPT

This is a short note of how to add PowerBI reports to the Role Center page on Business Central

On most of the BC role centers you have this page part:


So lets get started; clicking "Get started" takes you to a short wizard that checks your PowerBI license and then presents you with the updated view:


Here you can select to see any reports already published to "Enable" them to show on your Role Center page


Maybe you want something else; lets do a small chart to see who has open approvals

Open PowerBI desktop and get data 


There are a number of API data sources for BC, but none that happen to work for this example


Time for a new API! Thankfully this is SUPER easy for simple pages.


Head to the Web Services page and use the "Create Data Set" button

Here are my choices to get a feed of approval entries 




Done - the new AP shows up in the list in BC and in PowerBI after a quick refresh



Precious data! 


Just to spice things up, here is an extra requirement 
  • The records to be approved are Purchase Invoices, Purchase Orders and Vendor
  • Vendors are not Documents in BC, so the Document Type column is blank for those approvals 
    • This will not do! Conditional column time : 
Its been way too long since I used PowerBI and I forgot how to do that kind of thing. Lets see if ChatGPT can help.

So the code for queries you can get to by clicking on "Transform Data" on the PowerBI desktop home ribbon. Then click this button:



Our beautiful code for the query, lets feed this to ChatGPT




And the reply 



Does it work? Not quite.  


But the beauty of ChatGPT is that it gave me a rough idea and this guided my next google searches on what to use instead of the made up "Text.IsEmpty" function.

Here is the final code with the extra column code that works.



Now we have the data - lets make a simple chart - make the chart the size of the whole page as it will scale in BC.


Looks like some people have got some approving to be getting on with!

Next Publish the PowerBI report to a suitable workspace


Select in BC - that's it done!