Skip to main content

Notifications

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

Adding a field to a grid - Data only visible on one row

Posted on by 15

Hi All, not sure if this is the correct forum or not, but I have an issue with a field that I have added to a grid on the Sales Release Order Picking form in AX2009. I have added the SalesTable.DlvTerm (Delivery Term) to the grid. It shows up, but only displays data for the first record in the grid. The data in all other columns displays correctly, but the data for that new column is blank, except for the first row. 

If I click on the field, in any of the other rows, the data in the field will be displayed. If I click off the field onto another row, the data in the row will disappear, and the data in the row that I just clicked on will appear.

Any ideas?

Thanks for your help.

Alan

  • Typhoon Profile Picture
    Typhoon 15 on at
    RE: Adding a field to a grid - Data only visible on one row

    Hi Martin, I did that, and it's working as expected now. The trick was to exit Axapta, the new field that I added to the InventReleaseOrderPickingTmp table wasn't showing up in the old data source (which is why I added a new one). Once I restarted Axapta I could see the new field in the old data source, and was able to add it to the grid as normal. All records are displaying correctly now. Thanks for your help Martin, I appreciate it!

  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: Adding a field to a grid - Data only visible on one row

    You broke the form by ignoring the standard data source and using your new one. Don't do it - remove your new data source and point the grid back to the original data source. You just want to add a field to the existing data source, don't you? Adding a new data source isn't what you want.

  • Typhoon Profile Picture
    Typhoon 15 on at
    RE: Adding a field to a grid - Data only visible on one row
    Hi Martin, thank you so much for replying to me!
    The grid that I'm working on is the SalesReleaseOrderPicking grid, and the datasource that it is using is InventReleaseOrderPickingTmp. I added the field by just dragging it onto the grid from the Sales Table field list in the AOT, rather than by modifying the datasource, which is presumably why it is not working correctly.
    The InventReleaseOrderPickingTmp datasource has a 'Table' property of InventReleaseOrderPickingTmp.
    Yesterday I altered AOT\Data Dictionary\Tables\SalesReleaseOrderPickingTmp (added DlvTerm (Extended Data Type - CustDlvTermId) ).
    I also altered:
    Classes\InventReleaseOrderPickingForm_Sales\bldInventReleaseOrderPickingTmp (added this code:)
                //Added SalesTable.DlvTerm (Delivery Term)
                inventReleaseOrderPickingTmp.DlvTerm         = salesLine.salesTable().DlvTerm;

    I then went to Forms\SalesReleaseOrderPicking, and added a new Datasource called InventReleaseOrderPickingTmpNEW, pointing to the SalesReleaseOrderPickingTmp table (which now showed the DlvTerm field).

    Finally I set the Datasource on the grid to InventReleaseOrderPickingTmpNEW.
    When I open the form, zero records appear in the grid. What do you think I am missing?

    Thanks again for all your help, I appreciate it!

    Best wishes,
    Alan
     
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: AX 2009 - Adding a field to a grid - Data only visible on one row

    Yes, it's the right forum.

    What is the data source of the grid and how is SalesTable data source connected to this data source? I guess they're linked, not joined, therefore SalesTable records are fetched only for the single row selected in the grid. If so, you simply can't see values for all rows at once.

    Maybe you can modify SalesTable data source and join it to the main data source. But maybe it would break other logic, therefore your other option is adding an extra data source for SalesTable and join this one.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans