Exposing Bugs with Tests in Microsoft Dynamics NAV

This post is not an introduction to automated testing in Microsoft Dynamics NAV. If you don’t know what I’m talking about you should check out Luc van Vugt’s blog here first.

If you aren’t writing any automated tests for your code at the moment you should consider starting. You know that really, but it can difficult to get going. You need time to learn and become familiar with the testing framework in the first place. Then it takes time to write the tests. And then time to run them. Time you don’t have, time you’d rather spend doing something else…etc.

I Don’t Have Time

On that point, it really doesn’t take long to write tests after you’ve done your first few. There are tons of ‘library’ functions that help you create test data and documents with minimal fuss. You want to create a customer, create a sales order with an item line and then post it? That’s three lines of code.

Start with Bugs

A good place to start might be with bugs. Half the challenge with writing tests is defining exactly what you’re testing i.e. “given some initial scenario when X happens the expected result is Y.” Breaking a big codebase into snippets like that can seem daunting. With a bug you’ve got all the information you need. “Under these circumstances, when X happens we are getting Z when we were expecting Y.”

1. Write the Test First

Rather than diving into the code to find and fix the cause of the problem, take a minute to write a test for it. Recreate the steps that are leading to the bug in your test. Run the test and confirm that it fails.

Why write the test first? If you are going to use the test to confirm that the bug has been fixed (and doesn’t reappear sometime in the future) you want to be sure that the test itself works. If you write the test after the fix and it passes is that because you’ve fixed the problem or because the test is incorrect and will always pass?

Capture the bug while you’ve got the steps and the code to reproduce it. That way, you know that you’re looking at the right thing and that you’re actually fixing the issue.

2. Fix the Bug

Now you can go ahead and put the bug fix in.

3. (Re)Run the Test

Once you think you’ve fixed the problem you can run the test and confirm that it now passes. A test that passes having previously failed ought to give you a lot more confidence than one that has always passed.

Even better, you’ve added a test to your library that you can re-run when you make future changes to your code. You’re much like likely to reintroduce a bug that you’ve seen before if you’ve got a test that is specifically looking out for it.

Finding it hard to cope with last minute retailer orders?

  CPG intro slide


Retailers are notorious for waiting until the last moment to place stock orders with manufacturers and distributors, meaning the pressure is on to get items to them as fast and safely as you can.

Trouble is these types of demands can, for those without the appropriate systems, mean extra work and cost.

To best optimise your resources, you will need to fully understand what the customers’ requirements are and drive this information directly through your warehouse. Having clear processes in place for pick, pack, and dispatch, including delivery schedules, is critical and will help you to keep an efficient and effective supply chain.

Get the right information into you warehouse…

The first step in the process is to get the right information into your warehouse process, but giving your warehouse team a pile of papers and expecting them to sort through and get them in the correct order ready to deal with is not best practice!

Ideally, what you want to achieve is less work, with more time to process orders and get them successfully out of the door.

For this to happen, using warehouse devices which are linked directly into your ERP business application would give you time back and guide your team through the pick, pack, dispatch process within minutes of receiving the order. Helping to ensure orders are processed on an “urgent” to “normal” scale.

Get the delivery out the door…

Whether you use in-house delivery trucks or outsource to a third-party logistics company, there are lots of things to consider in the delivery process.

The main piece of the puzzle is integration – whoever is taking your products to their destination will need to know quantities, weights, tracking numbers and information, as well as printed labels. If you use third party logistics, you will need a manifest ready at the same time as the products leave, or for in-house transport, collection and delivery notes.

Another vital point to consider is the physical loading of vehicles, to make the lives of your delivery teams easier a first loaded last off system is best.

Loading and route planning can be done by truck or by end-retailer through an integrated system such as Dynamics Consumer Goods, saving time and wastage, and giving you the visibility to optimise timings and increase productivity.

Keep track of the finer details…

ASN’s, an Advanced Shipping Notice. This is a type of shipping notice often demanded by retailers really throws a spanner in the works for a paper-based warehouse.

The criteria for ASN’s is strict, meaning you will need be able to show what is in each container, on each pallet, and give each of these a unique UPC (universal product code) in order to give the end retailer a precise run down of what they are receiving.

This process can be easily managed however, by recording that information as you are picking and packing the stock. By using an electronic device/terminal in the warehouse it’s easy to specify which pallet is for which dispatch, and see where you can pick onto that pallet and close it when full; regardless of where about in the warehouse product needs to be picked from.

Getting visibility for your whole organisation…

At whatever skill, level or responsibility your warehouse staff work, they each need to know what needs to be done and when, and your managers need to be able to accurately monitor and manage these processes. That’s where ERP, EDI and warehouse management come into one.

An integrated software solution can make the manufacturing to goods-out process easy and effective, giving optimal visibility at every stage of the process, providing details for every link in the chain and allowing you to understand your warehouse traffic to better optimise for increased future performance.


Watch our series on Reasons to change your business software in the Consumer Goods sector https://www.youtube.com/playlist?list=PLoS7gV-LINmkEjanb8HXAXE9RR66f3cx4 to discover more…

New alliance allows Technology Management to expand its borders & deliver Microsoft business software across the globe


As the world becomes a smaller place, many of our customers are expanding. And for those customers who set up operations abroad, Technology Management are now able to offer a premier multi-national, ERP implementation service.

Through joining the thriving Pipol Alliance, Technology Management can now offer support for UK clients looking to implement Microsoft business software internationally as well as support those companies from overseas wanting to implement Microsoft Dynamics software here in the UK.

An internationally renowned provider of consulting and implemention services, Pipol offers a range of perks for SME’s including, and often most importantly for any organisation’s IT implementation project, a single point of contact for project management. The projects are then always delivered by the most professional and experienced local Microsoft Dynamics partners in each country.

James Crowter, Managing Director of Technology Management explains, “Whilst we already support quite a number of clients with their operations overseas, this collaboration takes our offering to the next level. Local expertise from the most professional and experienced Dynamics partners means successful projects that deliver the right balance of meeting local requirements with the drive for business process standardisation”.

Business intelligence – more than just financial reporting

Give everyone, not just those in your Finance team, a powerful new way to work with data.

User expectations are changing, and we know that most job roles now need self-service access to more types of data than ever before – to measure the success of every department.

To fully benefit from the power of data, organisations need to make it easy for all users to get access to the right data, at the right time, so they can make more informed decisions; whilst also giving IT the tools to manage data access, quality and compliance.

Whether you are on the go or in the office, you need to create rich, interactive reports and Microsoft Power BI offers you the tools you need. Stay connected to your data from anywhere, anytime. Watch our video for a quick run through.

Power BI gives a 360° view of your business data on the go – at the touch of your fingers and quickly connect, shape, visualise, and share data insights.

With Power BI, your dashboards help you keep a finger on the pulse of your business.  Your dashboards display tiles that you can click to explore further with reports. Connect to multiple datasets to bring all of the relevant data together in one place.

For a quick exploration of your data, you can even try asking a question in the Q&A box.  For example, try typing "what segment had the most revenue".

Power BI

If you have important data in an Excel spreadsheet on your computer, you can create a Power BI dashboard to stay informed anywhere and share with others. 

Microsoft Power BI is helping users spot risks & find opportunities at a glance so they can save the day, every single day.

Watch more at https://www.youtube.com/watch?v=gWHnLeT-WXs

8 top tips for successful international ERP implementation

Blog post

Even small and medium sized are now operating overseas. To support these expanded operations, many companies are now implementing one single business management system to harmonise/standardise common business processes, improve cross border collaboration and ultimately improve overall efficiency.

Working as part of the Pipol Alliance, Technology Management can now better support international deployments of Microsoft Dynamics NAV and Dynamics 365 – with one single point of contact for project management and the assistance of the most professional and most experienced Dynamics partners in each country.

Based on our joint experiences, here’s our 8 top tips for implementation Dynamics ERP internationally:

  1. Plan for early success & visible improvements: The shorter the phases of any project, the higher the chance of success. Focus early phases on both what is most important for the business but also delivers highly visible success. And always have a future phase planned, where you can park unresolved tasks or change requests. This way you will be able to keep every onboard and supporting the project without losing momentum.
  2. Understand and simplify: If you automate a process that you do understand or is overly complicated, you will get a complex system that you don’t understand. That is why you need to work in this order: 1) create understanding, 2) simplify, 3) automate. You cannot build systems before your business processes are defined and optimised.
  3. Think quality and ownership together: Quality assurance outside a process is overhead. Quality assurance incorporated in a process is proactivity. Processes that have built-in quality assurance provide the best basis for innovation and consistency in implementation.
  4. Do not underestimate local differences: Most assumptions about ERP systems across international boundaries are wrong. And the unexpected is always hidden in the detail, not in the main processes. So always make sure to involve your local teams.
  5. It takes time for people to get to grips with change: Whilst we all recognise that there will always be change, it takes time for people to translate the need for change into what it means for them. Therefore, when thinking of the transformation an ERP solution will deliver, invest the time into understanding and communicating the changes into language the various stakeholders will understand. And you will gain greater organisational support for the project as a result.
  6.  International implementations have greater potential for ROI: Whilst some companies can run on principles and values alone, when it comes to international ERP implementations formalised processes are necessary to guarantee results. And because many processes are common across geographies, you can achieve enormous synergy by having repeatable, reliable business processes that can be reused across the organization.
  7. Expected change to the plan: In real life, no project plan ever fits 100%. Plans are only worth something if they can be adapted and fine tuned to the changing conditions – both internal or external. Just make sure there is a formalised process for managing change requests, so you can deliver a realistic process and functional definition of the project.
  8.  It’s a team effort: You cannot enter into a fixed-price contract with your ERP supplier and then transfer all the project responsibility to them. Legal agreements cannot guard the company against mistake – and they often turn out to have the opposite effect. Like any major project or change to a business, ongoing and professional communication is key – both with your suppliers and across the organization.

Track every change made on Sales Orders in Microsoft Dynamics NAV – and save the history

Every wondered the value of orders you’ve had today and tried to report on that from Dynamics NAV? How do you track the orders you ship & invoice on the same day? How do you include a change in value where previously placed orders are amended or even cancelled?

Dynamics Additions Sales Input Log can keep track and control of the change to value and quantity made on every sales document (orders, invoices, credits & returns) made in Dynamics NAV between two specified times – down to the second.

Use this Dynamics Addition for Microsoft Dynamics NAV to know who is responsible for each entry, change or deletion and be able to dashboard each salesperson's performance to the second.

Then share knowledge of spikes or dips in demand as soon as transactions are entered, enabling you to better react to maximise your market share.

Watch our video to see how it works: https://www.youtube.com/watch?v=YGzWsBxl-d4

Using PowerShell Jobs for Parallel Execution

PowerShell is great and allows us to automate a bunch of tasks that would otherwise be repetitive and boring. Recently we’ve been investigating how to build a Microsoft Dynamics NAV environment (environment = SQL database, service tier and client) on demand on the local machine or separate SQL and NAV servers on the network.

Restoring the appropriate SQL backup, creating and configuring a service tier of the correct build and opening the correct client is all rather tedious and is ripe for some automation.

The details of how to build the environment isn’t really the subject of this post (maybe I’ll write about it one day) but how to make that process fast.

The sub-tasks of

  1. Restoring the SQL backup
  2. Obtaining the required object files from source control

can be relatively* time consuming, depending on how many objects need to be downloaded. However, there is no requirement for them to done in sequence. The whole process will be faster if we can do them at the same time.

We’re achieving this with a combination of sessions and jobs.

$Jobs = @()

$RestoreSQLScriptBlock = { [some code to restore the SQL backup] }
$SQLSession = New-PSSession $SQLServer
$Jobs += Invoke-Command –Session $SQLServer –ScriptBlock $RestoreSQLScriptBlock –AsJob
$CreateServerInstanceScriptBlock = { [some code to create NAV service tier] }
$NAVSession = New-PSSession $NAVServer
$Jobs += Invoke-Command –Session $NAVServer –ScriptBlock $CreateServerInstanceScriptBlock –AsJob
Write-Host 'Waiting for tasks to complete...'
Receive-Job $Jobs -Wait

If the above isn’t clear enough this is how it works:

  1. Create a $Jobs collection
  2. Create a script block variable to store the commands to execute on the target server(s)
  3. Create a remote PowerShell session on the target server(s)
  4. Use Invoke-Command to execute the script block in the remote session as a job and add the job details to the $Jobs collection
  5. Wait for all the jobs in $Jobs to complete before continuing with the rest of the script

Progress bars and output from the remote sessions are received by the parent session as it comes in. The remote server(s) need to be configured for PowerShell remoting, see Enable-PSRemoting.


*tens of seconds. Longer than I’m prepared to wait – I’m impatient.

Struggling to keep track of promotions or rebates?

Simple management of pricing & promotions – from admin through to sales in the Consumer Packaged Goods (CPG) industry.

Having the right pricing mechanism to drive sales can always be a dilemma in the workplace. How can you make this a simple enough process for your admin staff to execute, whilst at the same time giving your sales team the flexibility to be able to respond to market demand?

Using Dynamics CPG, with its pricing designed for dealing with independents through to major retailers, allows you to do just this. It means depending on individual customers, you can tailor-make their pricing to suit them best. It doesn’t have to be just one way and one way only.

Flexibility to handle any type of promotion – be it customer specific or across the board

Dynamics CPG pricing functionality delivers a fast solution for all your pricing needs. This can help with all the promotional mechanics that you can normally think of e.g. buy one get one free, discounted items and even rebates. This functionality enables you to create single or multiple-use promotion codes with value or time-based expiry to suit the needs of an individual customer.

Your staff can understand what it means for margin and execute orders right there in front of the customer. It doesn’t matter how the customer chooses to order, straight away they can tell how much they are going to get charged and also what the price would be if they ordered a higher quantity to drive them up to that next price break.

Opening new accounts with tempting offers – accessing new markets

Alternatively, you can use Dynamics CPG to open those precious new accounts, to exploit your competition or get new products into existing accounts by using a purchase discount; enabling the customer to try out your product(s) at minimal cost. It’s about making your company stand out from the crowd with a quick and simple solution.

Company-wide visibility & automatic promotions & pricing – saving time & admin

Using Dynamics CPG it means that all the pricing updates are automatic, your staff won’t need to remember, which means no time is wasted. Your staff don’t have to look up Excel spreadsheets or refer to notebooks to pull out that information. All you need to do is put the order on Dynamics CPG as normal, and if the rules for that promotion are there it will automatically apply it.

This will help keep your customers happy, your staff will have done no more work, and you’ve got the flexibility to be able to drive the market as you need to.

Seems too good to be true? Why don’t you take a look for yourself…?

For more information on pricing designed for supplying through the retail sector watch our video

How to harness the power of Outlook for stronger financial control – in the manufacturing & distribution industry

According to a recent Aberdeen Report “What do Manufacturers look in an ERP solution, March 2017, 50% of the manufacturers surveyed citied “Ease of Use” as the top criteria for selecting an ERP solution – maybe somewhat surprisingly ahead of functionality (48%), total cost of ownership (43%) and time to value (27%).

But what is the software solution that business users are most familiar with, and therefore find the easiest to use? Well, Outlook of course!

With the latest version of Microsoft Dynamics business software, namely Dynamics 365 soon to be available here in the UK, you will be able to go from “quote to cash” without leaving your inbox.  You can create customers, suppliers and quotes as well as process orders and submit invoices without ever switching applications. All of which makes it easy for everyone in your organisation to execute ERP transactions in a more familiar and productive manner. As a result, all your business activities are quickly and easily recorded, so you have up-to-minute visibility of all business operations.

Another interesting statistic I noticed recently is that 55% of all emails1 are now opened on a mobile device (plus another 19% via webmail) illustrating how important it is for people to be able to access information on the move or somewhere other than their usual office environment.

So if you are looking at new business software how do you best respond to these end users’ demands i.e. ease of use and access anywhere?

With Dynamics 365 available on your mobile device of choice, no longer is your mobile working confined to answering emails and phone calls. Now you can also sign off quotes and purchase orders, review the latest reports or dashboards or catch up on the latest visit report with a key client at a time and location to suit.

Only Microsoft Dynamics business solutions can bring the ease of use of Outlook to the perceived (and sometimes real) complexities of ERP to deliver the financial and operational control needed by growing manufacturing and distribution businesses.

Download our eBook The Director’s guide for replacing accounting software to see how easy it is to simplify your business processes and improve financial control.

1 https://litmus.com/blog/webmail-increases-to-29-for-november-email-client-market-share

Supplying to the retail sector? Poor communication between field sales, merchandisers and your team in the office holding you back?

CPG intro slide

Get a joined-up way of working for every member of your team – from field sales through to customer service.

There isn’t a Consumer Goods company out there that doesn’t want to grow their sales and a big part of that is getting the most from your sales team.

But it’s sometimes harder than it sounds to make sure that your internal people and external sales people are working in a cohesive, joined-up fashion in dealing with both the independents and the major retailers, but that’s where Dynamics Consumer Goods can step in.

Give your team the right tools to be effective – work smarter, not harder

There are many aspects that Dynamics Consumer Goods can help with to make sure there is a smooth transition from customer site to back in the office.

Having Dynamics Consumer Goods at the center of your sales operations means that field sales, before every visit, can get contextual information against each account that shows exactly the performance of that account, what merchandising has been agreed or what promotions are in place. They also get to see any issues against that customer, so that they understand what’s been happening and what questions they might face during that face-to-face conversation with the client.

Get instantaneous updates for your 24/7 customer view – pair your field sales team with internal resource

Then when your account manager leaves the customer site, they can quickly and easily fill in a visit report on their device of choice, and that logs the information back into Dynamics Consumer Goods. This initiates the actions that are required to be done by the people following up back in the office.

You can’t underestimate the impression that it gives the customer – that you are an organisation that’s on the ball.

So instead of your external account manager sitting in laybys trying to make calls, trying to follow up queries that have come up in the meantime, pair them up with an internal resource that’s much more cost effective. This means that person can not only make appointments but also follow up on actions and can ensure that agreed objectives have been achieved – from both the customer’s side and for your people internally.

Dynamics Consumer Goods allows you to assign and keep track of any of the actions that normally would tie up your external account manager for a considerable period. It also means that when an existing account needs a visit, the internal person can try and open up several new accounts in that same area and make appointments for that same period of time.

Smoothing the way for modern technology – making the most effective use of your resources

Here’s a question, how do you get those members of staff who have been with you for years and are stuck in their ways to transfer to the new technology? Well it could be just one quick easy solution!

Dynamics Consumer Goods can be used on an iPad (and other tablet devices) – a tool even the most traditional of sales staff are used to using. By giving your sales people a tablet, it allows them to use Dynamics Consumer Goods while they are with the customer, in a way that’s not confrontational as if they were using a laptop. A tablet device also allows them to scribble notes in the same way as they would with a paper notebook as they would have done in the past.

What this now means is that the information can be captured and shared instantly, even with photographs embedded into the visit report for reporting on merchandising for example, and makes it available to either management or their colleagues who need that information to follow up correctly.

For more information on how Dynamics Consumer Goods can support your internal sales, external sales and merchandiser teams, watch our video.