AX 2012 Vendor Invoice workflow : workflowtrackingStatusTable.CONTEXTRECID not found in VendInvoiceInfoTable

AX 2012 Vendor Invoice workflow : workflowtrackingStatusTable.CONTEXTRECID not found in VendInvoiceInfoTable

This question is not answered

Hello,

I am writing a query to pull the workflow approval history for completed vendor invoice approvals.   I understand that the WORKFLOWTRACKINGSTATUSTABLE links to the VENDINVOICEINFOTABLE on WORKFLOWTRACKINGSTATUSTABLE .CONTEXTRECID ==  VENDINVOICEINFOTABLE.RECID.  I am minding the WORKFLOWTRACKINGSTATUSTABLE .CONTEXTABLEID value.    

What I am finding is that many times the WORKFLOWTRACKINGSTATUSTABLE .CONTEXTABLEID does NOT refer to a RECID in the VENDINVOICEINFOTABLE even though the WORKFLOWTRACKINGSTATUSTABLE .CONTEXTABLEID says that there is where it should be found.

I am trying to show the invoice and vendor that the completed workflow applies to and am paying hell to do it.  If you can offer some guidance with this, it would be greatly appreciated.

Thank you,

Joe

All Replies
  • We have run into what appears to be a bug in the pending vendor invoice function.

    Following are the details :

    a) After entering  a pending vendor invoice, and then submitting it -  a duplicate record of the invoice is being created in the VendInvoiceInfoTable.  

    b) The duplicate record is not removed until after the Vendor invoice (VendEditInvoice) is closed.  

    c) If the VendEditInvoice form is not closed and the approver approves the invoice, the workflow instance record in the WorkFlowTrackingStatusTable is  linked to the duplicate record (WorkFlowTrackingStatusTable.ContextRecId = RecId of the duplicate record in VendInvoiceInfoTable); however, when the VendEditInvoice form is closed the duplicate record is removed, causing the record in the WorkFlowTrackingStatusTable to point to a record in  the VendInvoiceInfoTable that no longer exists.  This causes the workflow history to be orphaned from the vendor invoice that it was created for.

    This issue has been duplicated in both an Ax2012 r2 and an AX2012 r2 with CU6 environment.

    Has anyone else seen this?

    Thanks,

    Joe