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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

workflow display value and workflow status are not in sync

(0) ShareShare
ReportReport
Posted on by 131

Hi.

I have created a new display field which stores the value of name of approval of workflow when the workflow is in Review status. But I can see that it takes time to change the status of the workflow but display method value changed immediately.

for example:

scenario of display method :

Inreview---- "name A"

other than Inreview---- "Blank"

but i can see:

draft---blank

Inreview--blank

after few min : inreview--- "name A"

we want both the changes display method and status on workflow change samentaneously.

I have the same question (0)
  • Anton Venter Profile Picture
    20,346 Super User 2025 Season 2 on at

    Logically speaking and just guessing, it would seem your display method is getting the name value from a different source than from what you are "seeing". The workflow data is updated by the workflow batch job and that's of course where the delay is from. Assuming that what I think is true (different sources), perhaps you can change your display to use the same data?

  • aayushii Profile Picture
    131 on at

    Hi Anton,

    I can see that while fetching the name I am using worflow status example: if status is in review then only display the name of step

  • André Arnaud de Calavon Profile Picture
    301,130 Super User 2025 Season 2 on at

    Hi aayushii,

    If you have created the display method on a form, you would need to add a parameter for passing the record to use as source. If the replies from Anton and me are not helping you directly, please share the technical details how this display method was added.

  • aayushii Profile Picture
    131 on at

    I have added the display method on tbale level and then use it on form, I have also passed the table name on display method

    code is :  public display str pendingapprovalname(RequestTable  _RequestTable)

       {

           WorkflowTrackingStatusTable workflowTrackingStatusTable;

           WorkflowTrackingTable  workflowTrackingTable;

           WorkflowWorkItemTable workitem;

           select workitem where workitem.RefRecId == _RequestTable.Recid

               && workitem.RefTableId == _PTPTORequestTable.TableId

               && workitem.Status == WorkflowWorkItemStatus::Pending

           join WorkflowTrackingStatusTable

               where WorkflowTrackingStatusTable.CorrelationId == workitem.CorrelationId

           join workflowTrackingTable  order by RecId desc

               where workflowTrackingTable.WorkflowTrackingStatusTable == workflowTrackingStatusTable.RecId

              && workflowTrackingTable.TrackingContext == WorkflowTrackingContext::Step;

           return workflowTrackingTable.Name;

    }

    using the above disply method in form where workflow is enable.

  • Anton Venter Profile Picture
    20,346 Super User 2025 Season 2 on at

    Thanks for showing the code. If the display method is on the table, it cannot have a parameter or argument. If you remove the parameter, you can refer to the table buffer fields using "this" e.g. this.<YourFieldName> etc, If the display is in the datasource of form, it must have a parameter.

    Have a look at the article below which explains this a bit more:

    Using the display Method Modifier

    https://learn.microsoft.com/en-us/dynamicsax-2012/developer/using-the-display-method-modifier

  • Komi Siabi Profile Picture
    13,109 Most Valuable Professional on at

    Dear aayushii,

    Please, next time use the Use rich formatting when pasting code for us to read.

    I believe this is continuation of a process from this thread.

    https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/486116/workflow-step-name

    This is what I feel is happening. 

    * Immediately after the workflow is submitted - You are changing the workflow status to "In review" even when a work item has not been created yet.

    Can you please confirm that?

  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi aayushi,

    Name of the approver will get assigned after the work item is created. After creation of the work item only, workflow status will get updated. So, I think there will be delay in getting the updated status.

    Also, I don't think there won't be any issue with display method you have written.

    Thanks,

    Girish S.

  • Komi Siabi Profile Picture
    13,109 Most Valuable Professional on at

    Hello aayushii ,

    Can you show us what you have in the submit manager class?

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans