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, ...
Answered

Display method is not available in Workflow configuration

(5) ShareShare
ReportReport
Posted on by 331
Hi,
 
I extended the 'InventJournalTemplateDocument' document class for return the value based on the inventory adjustment lines,
but in the Workflow conditional statement the field is not available.
 
Code 1:
[ExtensionOf(classStr(InventJournalTemplateDocument))]
final class InventJournalTemplateDocument_TSIM_Extension
{
    public DMFNoYesStr getInventAdjustQty(CompanyId _companyId, TableId _tableId, RecId _recId)
    {
        InventJournalTable inventJournalTable;
        InventJournalTrans inventJournalTrans;
 
        DMFNoYesStr autoApprove = 'Yes';
        inventJournalTable = inventJournalTable::findByRecId(_recId);
        
        select firstonly inventJournalTrans
            where inventJournalTrans.RecId == inventJournalTable.RecId &&
            inventJournalTrans.Qty <=  0;
        if(inventJournalTrans)
        {
            autoApprove = 'No';
        }
        
        return autoApprove;
    }
}
I used the EDT's of Name, Description, NoYesId, String10 but no luck.
How can I get this field in workflow configuration?
 
Categories:
I have the same question (0)
  • Suggested answer
    Waed Ayyad Profile Picture
    9,090 Super User 2026 Season 1 on at
     
    You should add the Display method to the table, and sync the database, then you should see it on the workflow configuration.
     
     
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

  • Suggested answer
    Ramesh Kumar Profile Picture
    7,547 Super User 2026 Season 1 on at

    I think the method must return a supported data type (str, int, enum, etc.) Most importantly — the method must be decorated with attributes so the workflow runtime can detect it.

    Thanks, Ramesh

    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.

  • Waed Ayyad Profile Picture
    9,090 Super User 2026 Season 1 on at

    Hi, 

    Is your issue resolved? If yes, mark the answers that helped you as verified. 

    Thanks,

    Waed Ayyad

  • Waed Ayyad Profile Picture
    9,090 Super User 2026 Season 1 on at

    Hi, 

    Is your issue resolved? If yes, mark the answers that helped you as verified. 

     

    Thanks,

    Waed Ayyad

  • Verified answer
    Anton Venter Profile Picture
    20,657 Super User 2026 Season 1 on at
    Hi,
     
    To get methods as fields in the workflow configuration, you have to add parm methods to your workflow document class. Something like this below. Note, the code below is from my AX 2012 archive and I changed it a bit form for this post and I haven't tested it F&O but it still should work.
     
    public class MyApprovalWorkflowDocument extends WorkflowDocument
    {
        public MyEnum parmHasCreditLine(CompanyId _companyId, TableId _tableId, RecId _recId)
        {
            SalesTable salesTable;
            MyEnum hasCreditLine; //custom base enum with label
    
            changeCompany(_companyId)
            {
                salesTable    = SalesTable::findRecId(_recId);
                if (salesTable)
                {
                    hasCreditLine = salesTable.type().myHasCreditLine() ? MyEnum::Yes : MyEnum::No;
                }
            }
    
            return hasCreditLine;
        }
    }
     
  • Verified answer
    Saran S Profile Picture
    331 on at
    Thanks for all your replies.
     
    The issue was due to the method name. For this process, the method name should be like parm.
    I renamed my method from getInventAdjustQty to parmInventAdjustQty, and now it's working fine.
  • Anton Venter Profile Picture
    20,657 Super User 2026 Season 1 on at
    Awesome. Thanks for verifying.

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 March 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 669

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 331 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans