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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Workflow - Get Escalated To and Reassigned To User Name

(0) ShareShare
ReportReport
Posted on by 112

Hi Everyone,

My requirement is to get Workflow Escalated To and Reassigned To User name from Workflow.

Description : 

Suppose i have one workflow X. When we see the tracking details we can see that it has been escalated from User A to User B.

I need to get the value of User B through X++ coding as i need it to display it on the report.

Kindly help anyone with the code snippets if any. 

Or from which table i can fetch the value of User B.

Same goes with the case of Reassigned To

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    guk1964 Profile Picture
    10,888 on at

    You can set up alert notifications by email for Event, and that includes escalation.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi,

    Have you checked the standard workflow history report/form?

    Doesn't this one fulfill your requirement already?

    Best regards,

    Ludwig

  • Suggested answer
    Khushhal Garg Profile Picture
    1,514 on at

    Look at Workflow* tables and you can retrieve User B from these tables.

  • Suggested answer
    Riswan Profile Picture
    107 on at

    Hi Rahul,

    It's WorkflowWorkItemTable. You can filter by pending status for User B.

    Regards,

    Riswan.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    I agree with Riswan , It would be workflowWorkItemtable . Following sample query might help you to get some idea to retrieve records you want. The below query is  for retrieving pending vendor invoice approval workflow but you can write your own as per requirement. 

     WorkflowWorkItemTable workItem;

    while select crosscompany Num, InvoiceAccount, CreatedDateTime, DataAreaId
                    from invoice
                        where invoice.RequestStatus == VendInvoiceRequestStatus::InReview
                join UserId, CreatedDateTime
                    from workItem
                        where  workItem.RefTableId == invoice.TableId
                            && workItem.RefRecId   == invoice.RecId
                            && workItem.Type       == WorkflowWorkItemType::WorkItem
                            && workItem.Status     == WorkflowWorkItemStatus::Pending

  • Rahul_sinha Profile Picture
    112 on at

    @Ludwig Reinhard  

    [quote user="Ludwig Reinhard"]

    Hi,

    Have you checked the standard workflow history report/form?

    Doesn't this one fulfill your requirement already?

    Best regards,

    Ludwig

    [/quote]

    Yes, i have checked the standard workflow history report/form, but the fields only showcase the data for "Escalated by" and "Reassigned by" which i found in the table "WorkflowWorkItemTable" but "Escalated to" and "Reassigned to" is not present in any workflow system tables.

  • Rahul_sinha Profile Picture
    112 on at

    @Riswan I tried but this doesn't worked. Any other way?

  • Rahul_sinha Profile Picture
    112 on at

    @Sukrut Parab I have used this code for "Escalated by" and "Reassigned by" and "Last action taken by", but for former "Escalated To" and "Reassigned to" does not fulfill this code criteria. Any other suggestions?

  • Verified answer
    Riswan Profile Picture
    107 on at

    Hi Rahul,

    In the same table,

    1. There is a field called type, if you filter by Escalated for User B you can achieve the ESCALATION TO scenario.

    2. There is a field called status, if you filter by Delegated for User B you can achieve the REASSIGNED TO scenario.

    Regards,

    Riswan.

  • Rahul_sinha Profile Picture
    112 on at

    @Riswan Thanks a lot. I got Escalation To value correctly.

    Can you Please tell me how to find "Last Action Taken by Value"

    I have written this code, but it seems to be not working fine. Please review and let me know the correct code snippets.

    3617.png

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans