Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Display data from second datasource on grid as view

(0) ShareShare
ReportReport
Posted on by 90

So i have my own custom table & form, kinda our own custom system thats not related to AX transaction.

as AX already provide me for master item data on Inventtable, i dont want to create another item data & use relation to Inventtable for my custom table.

now, on my form with my custom table as grid datasource, i can insert/update/delete data on it & with relation i can lookup into Inventtable when selecting an item.

The issue, i cant display PartNumber & Partname that are part of Inventtable into the grid. if i put Inventtable on datasource, use link, & disable allow create/delete/edit, i cant add new line to my custom table.

if possible i want to avoid using display method as it kill filter function (ctrl+G).

is there some work around for me to show PartNumber & PartName as data view only while i can still insert/update/delete the data on the main datasource (my custom table)

Thank you.

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,340 Most Valuable Professional on at
    RE: Display data from second datasource on grid as view

    Join InventTable data source to your main data source. Add the fields that you need and make them read-only. Then override write() and validateWrite() methods on InventTable data source. Remove super() from write() (which will prevent saving) and from validateWrite(), and let validateWrite() always return true (you don't need to validate it and you probably don't want saving to fail because of problem in InventTable).

    You can see this technique used with InventDim data source in SalesTable from, for example.

    By the way, because your question is clearly about development, I've changed the category from Other to Development / Customization / SDK.

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,602 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,340 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans