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, ...
Suggested Answer

getting data from two different tables through the args class

(0) ShareShare
ReportReport
Posted on by 45

Hi, 

I have a grid that displays data from two different tables, I'm using the args class to pass the data to another form  and it works for just one table but I can't get the other data table, I tired to use select statements but just keep getting me the same value gettingTwoTablesData.png

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    304,508 Super User 2026 Season 1 on at

    Hi Kareem,

    Can you provide more information? What exact tables are used on the first form and what should be the result when you start the second form?

  • Kareem Taima Profile Picture
    45 on at

    Hi André ,

    I have a grid in FormA it has data from SalesAgreement table and AgreementLine table, when I select line and press buttonOpenFormB I need to have the data in the record from both table, but I only managed to get the data from SalesAgreement table using args class, I couldn't  get AgreementLine table data in FormB.. I managed to get the data using select statement between AgreementLine and SalesAgreement, I don't know if you can do it through args class or I'm just dreaming :D

    thank anyway

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    You can pass only one table buffer via args.record().

    But if you pass SalesAgreementLine, you always know how to fetch SalesAgreementTable, right?

    Or, if you pass SalesAgreementTable, you can iterate all lines in code.

    But, you can also user args.caller() to get the whole FormRun object of the caller form. Via FormRun you can access any object on the caller form. Including active records in all data sources.

  • Suggested answer
    Martin Dráb Profile Picture
    239,381 Most Valuable Professional on at

    The best option may be using relatedTable() method. You can see an example in CustTable.name().

  • Kareem Taima Profile Picture
    45 on at

    thank you a lot

    it's big help

  • Kareem Taima Profile Picture
    45 on at

    thanks

    I'll try it

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 694

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 337

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans