Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Can you get a record from Table.dataSource()?

(0) ShareShare
ReportReport
Posted on by 3,081

I noticed this method on a table I'm working with and I'm wondering if it is possible to get the record currently in the 'dataSource'.  I've run 'isFormDataSource' on the same table and it is true.

*This post is locked for comments

  • Suggested answer
    adam260 Profile Picture
    adam260 1,871 on at
    RE: Can you get a record from Table.dataSource()?

    check out this axcalated.blogspot.com/.../looping-through-forms-datasource.html  

    it will show you how to loop through a forms data source along with looping through any selected records

  • Suggested answer
    RE: Can you get a record from Table.dataSource()?

    Table.datasource().cursor() will return Table.

    So your question does not make sense as such.

    Can you explain what you are trying to do?

  • Verified answer
    Joris dG Profile Picture
    Joris dG 17,775 on at
    RE: Can you get a record from Table.dataSource()?

    Hey Brad,

    formdatasource.cursor() should be what you want.

  • b_radlyjames Profile Picture
    b_radlyjames 3,081 on at
    RE: Can you get a record from Table.dataSource()?

    Deniss,

    How do you get the record out of FormDataSource?

  • Suggested answer
    Denis Macchinetti Profile Picture
    Denis Macchinetti 16,444 on at
    RE: Can you get a record from Table.dataSource()?

    Hi

    You have to declare a FormDataSource variable and assign with this.dataSource(), like :

       FormDataSource  formDataSource;

       formDataSource = this.dataSource();

       formDataSource.xxxx

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans