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.