Incorrect Microsoft Dynamics GP Purchase Orders Workflow Status

Microsoft Dynamics GPI recently had an error reported to me in Microsoft Dynamics GP where some final approved purchase orders were not working correctly when opened in the Purchase Order Entry window (Purchasing area page » Transactions » Purchase Order Entry).

The PO is shown as not submitted in the workflow status bar, but the button on the tool is a Recall button rather than a Submit one showing that the document has been submitted:

PO Entry window showing workflow status bar and action pane

In addition, if you tried to open the Workflow History window, the following error was produced:

Error message opening Workflow History

The record has been deleted since you opened this window.

I did some exploring and found the issue was corruption on the Purchase Order Work (POP10100) table whereby the Workflow_Status column had the wrong value; it was set to 4 instead of 6. There was a set of about a dozen POs with this problem; ones before and after were working correctly so it appears to have been a temporary issue which then can’t be reproduced.

To fix the corrupt items, I created a simple SQL script which would correct the Workflow_Status column:

/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */
UPDATE ['Purchase Order Work'] SET Workflow_Status = ['Workflow Instance Master'].Workflow_Status FROM POP10100 AS ['Purchase Order Work'] INNER JOIN WFI10002 AS ['Workflow Instance Master'] ON ['Workflow Instance Master'].WfBusObjKey = ['Purchase Order Work'].PONUMBER WHERE ['Purchase Order Work'].Workflow_Status = 4 AND ['Workflow Instance Master'].Workflow_Status = 6

As always with SQL scripts which do updates, make sure you test the script and have a good backup

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Looking for support or consultancy with Microsoft Dynamics GP?

I no longer work with Microsoft Dynamics GP, but the last company I worked for was ISC Software in the UK; if you’re looking for support or consultancy services with Microsoft Dynamics GP you can contact them here.

2 thoughts on “Incorrect Microsoft Dynamics GP Purchase Orders Workflow Status

  1. Manny says:

    Hello, Thanks for the information you posted. We are having this issue pretty regularly. Did you every find out what is the root cause of the issue?

    Thanks!
    Manny

    1. Ian Grieve says:

      Hi Manny,

      No, we’ve not been able to reproduce the error and I’ve not heard it being reported since.

      Ian

Leave a Reply

Your email address will not be published. Required fields are marked *