web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

I want the query statement that is executed on SQL get WorkFlow History in F & O

(2) ShareShare
ReportReport
Posted on by 322
Hi
 
I need an SQL query to retrieve the  Purchase Requisition>>Workflow History  in Dynamics 365 Finance & Operations. Specifically, I want to extract the data from the 'Tracking details list' tab in the Workflow History screen to generate a report.
 
Purchase Requisition: 000031
 
Of course, I want the query sentence according to the number Purchase Requisition: 000031
 
Categories:
I have the same question (0)
  • Suggested answer
    CU07021417-0 Profile Picture
    2 on at
    select firstonly from 'tablename' where 'tablename'.'field' == 000031;
  • CU09091051-0 Profile Picture
    322 on at
    Thank you Mr. "CU07021417-0" for the reply, but unfortunately this is not the solution.... The data source for the "Tracking Deliles List" tab is the "" table "WorkflowStatusTrackingTmp" and when I query "Select * from WorkflowStatusTrackingTmp" it gives me that the table does not exist
     
     
     
     
     
     
    What is the table that contains the "Tracking Deliles List" movements"" and is linked to the main "WorkflowTrackingStatusTable "table؟؟؟؟؟؟
  • Suggested answer
    Justin Kruger Profile Picture
    186 on at
    Hi,
     
    The two tables you are looking for is WorkflowTrackingStastusTable and WorkflowTrackingTable
     
    Try this query:
     
    select * from WORKFLOWTRACKINGSTATUSTABLE WTST
    join WorkflowTrackingTable WTT on WTT.WORKFLOWTRACKINGSTATUSTABLE = WTST.RECID
    where WTST.INSTANCENUMBER = '000846'
  • Suggested answer
    Aymen CHELBI Profile Picture
    620 Super User 2026 Season 1 on at
    Hi,
     
    Try this query : 
     
    SELECT
        pr.PurchReqID,                      -- Purchase Requisition ID
        wf.WorkflowInstance,                 -- Workflow Instance ID
        wf.TrackingNumber,                   -- Workflow Tracking Number
        wf.WorkItemType,                     -- Work Item Type
        wf.Status,                           -- Workflow Status
        wf.CompletedDateTime,                -- Completion Date and Time
        wf.CreatedDateTime,                  -- Created Date and Time
        wf.UserName,                         -- User who performed the action
        wt.WorkflowTypeName,                 -- Workflow Type Name
        wt.Description AS WorkflowDescription, -- Workflow Description
        wf.ActionName,                       -- Action Taken in Workflow
        wf.Note                              -- Notes/Comments in the Workflow
    FROM 
        PurchReqTable pr
    JOIN
        WorkflowHistory wf
        ON pr.PurchReqID = wf.PurchReqID
    JOIN
        WorkflowTrackingDetails wt
        ON wf.WorkflowInstance = wt.WorkflowInstance
    WHERE
        pr.PurchReqID = '000031'            -- Specific Purchase Requisition
    ORDER BY
        wf.CompletedDateTime DESC;          -- Sort by Date for chronological order
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 694

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 584 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 518

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans