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 :
Microsoft Dynamics AX (Archived)

How to change the record in a datasource

(0) ShareShare
ReportReport
Posted on by 455

Hi.

I am trying to Implement a functionality where a user can select multiple records in a grid and perform some operation through a button click. 

For example select multiple journals and click Post. The problem I am facing is AX only pass the last selected record to the action menuitem (class) instead of passing selected records one-by-one in a loop. 

code on the click event of menuitembutton looks like this. 

ProdJournalTable    localProdJournalTable;
    localProdJournalTable = prodJournalTable_ds.getFirst(true) as ProdJournalTable;
    
    if(localProdJournalTable)
    {
        while(localProdJournalTable)
        {
            element.args().record(localProdJournalTable);
            super();
            localProdJournalTable = prodJournalTable_ds.getNext() as ProdJournalTable;
            
        }
    }


*This post is locked for comments

I have the same question (0)
  • Samy123 Profile Picture
    455 on at

    call to super() does the actual job. It calls the main method of class ProdJournalCheckPost

  • Samy123 Profile Picture
    455 on at

    Nevermind I got it. I replaced super with actual job post code and passed the localprodjournaltable to its method.

    Regards

  • Samy123 Profile Picture
    455 on at

    Its a duplicate of a standard post menuitembutton. I replicated the pust journal functionality in my custom menuitembutton with a change that users can select multiple journals and post them with one click.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
imran ul haq Profile Picture

imran ul haq 8

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans