web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 320
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
    I want the query statement that is executed on SQL get WorkFlow History in F & O
    select firstonly from 'tablename' where 'tablename'.'field' == 000031;
  • CU09091051-0 Profile Picture
    320 on at
    I want the query statement that is executed on SQL get WorkFlow History in F & O
    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
    183 on at
    I want the query statement that is executed on SQL get WorkFlow History in F & O
    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
    376 on at
    I want the query statement that is executed on SQL get WorkFlow History in F & O
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 813

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 738 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 566 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans