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

How to the args value from one class to another class

(0) ShareShare
ReportReport
Posted on by 230
Hi Team,
 
I am try to post Production control -> PickingList.
 
In ProdJournalCheckPost class main method below parameter is passing.
 
{Args(, Parm: , Enum: NoYes::No, MenuItemName: ProdJournalCheck)}
 
////
 
I have extend JournalCheckPost class.
 
Here i have to get same args() value.
Below is the code.
[ExtensionOf(classStr(JournalCheckPost))]final class JournalCheckPost_Extension{{    public void run()    {        next run();        Args _args = new Args();    }}
Please let me know how to get {Args(, Parm: , Enum: NoYes::No, MenuItemName: ProdJournalCheck)} args value in JournalCheckPost_Extension class.
  • GirishS Profile Picture
    27,845 Moderator on at
    Hi,
     
    It's difficult to pass the Args value from the main method.
    Instead, I would suggest you create a table with field like Enum field and menu item name field.
    Create extension for ProdJournalCheckPost main method - Insert the values from the main method argument to custom table. Later in the JournalCheckPost class you can add a select statement from the create table and get the values.
    Important will be you need to delete a record from the table before inserting to it.
     
    Thanks,
    Girish S.
  • CU21071332-0 Profile Picture
    15 on at
    You will see bunch of methods and object if you put break point on Args _args = new Args(); 
     
    _args.record();
    _args.caller()
     
     
     
     
  • goshoom Profile Picture
    8 on at
    If you interested in the enum value, look at code in ProdJournalCheckPost::newProdJournalCheckPost(). There parmEnum() is passed to the constructor of the right subtype (and you can later find it in an instance variable). Nevertheless it seems to me that the code expects a value of JournalCheckPostType enum, not NoYes enum.

    If you want to base business logic on the menu item name, then I suggest that you reconsider your design.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 265 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 215

#3
Subra Profile Picture

Subra 177 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans