web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Get all rows from the MarkupTrans table into a Grid in the PurchTotals form

(0) ShareShare
ReportReport
Posted on by 405
Hello everyone,
I am a new developer in the X++ language and D365 Forms.
I am facing a problem, or rather, it seems to be an error due to my lack of knowledge in dealing with Forms. The problem, in short, is that I need to create a Grid inside the PurchTotals Form, and this Grid should retrieve data from the rows in the MarkupTrans table.
I have created an extension for the Form and have added a new data source where I've linked the MarkupTrans table. I have also retrieved the necessary fields. However, the data that is being displayed to me is not what I want in its entirety. I need to display all the rows in the MarkupTrans table, but the rows being displayed are the ones that appear in the /Accounts payable > Purchase orders > All purchase orders > Maintain charges/ interface. This means that it retrieves the rows that have been distributed on invoices.
I need a way to retrieve all the rows from this table without any restrictions or data filtering.

Thank you for giving me some of your time.
I have the same question (0)
  • Suggested answer
    Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
     
    What is the exact requirement? This form PurchTotals is used in Different forms and if you see the DataSource is Common and the Common is the base class for all tables, so it depends on the caller form and DataSource, and it isn't correct to add it without knowing the exact requirements. 
     
     
    Thanks
    Waed Ayyad
  • Ali AbdAlNasser Profile Picture
    405 on at
    Hello Waed Ayyad,
    I appreciate your response to my question. I wanted to inform you that I have added the MarkupTrans table to the data source as shown in the image below.
     
    However, I didn't understand what you meant exactly. But anyway, this is what I want without any relationships or conditions, just displaying the table data in the grid.
    Thanks
  • Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi Community member,
     
    What are the properties of the datasource that you added to the form? ("join source" and "link type")

    Also i'm not sure why you said you want it without a relation. As there is a relation between MarkupTrans and Common based on tableId and recId
     

    Thanks,
    Layan Jweihan
  • Ali AbdAlNasser Profile Picture
    405 on at
    I understand the relationship between the two tables, but I don't want to execute a specific condition, which is the "Keep" condition. Currently, it retrieves rows that have a value of 1 and ignores rows that have a value of 0. I want to remove this condition.
     
    If you activate the join, no rows will appear.
     
    And here are the data being displayed.
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    How about showing data in a temp table instead of datasource addition? 
     
    If you need to add via datasource like how you did, in that case you need to debug the code and find how the data is rendered to the user. It can happen that somewhere the range might have been set to show only these values based on the Table where the common is being initialized.
  • Suggested answer
    Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    The Hi Community member,

    Can you share the properties of the new Grid that you added?
     
    "If you activate the join, no rows will appear." ----- Did you try Outer join? 
     
     
    Thanks,
    Waed Ayyad
  • Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi Community member,

    Thanks for sharing the grid properties. May I ask how are you accessing this purchTotals form?
    is it from "all Purchase orders" then you click the button "Totals" or from where exactly? (if you can share full screenshot of the form please)

    Thanks,
    Layan Jweihan
  • Ali AbdAlNasser Profile Picture
    405 on at
    Hello Waed Ayyad,
    I have tried all types of membership and none of them have worked.
  • Ali AbdAlNasser Profile Picture
    405 on at
    Hello Layan Jweihan,
    From this path, I open the PurchTotals form.
     
     
  • Ali AbdAlNasser Profile Picture
    405 on at
    Hello everyone!
    I would like to thank you all for your response and your attempts to help me solve my problem. I am extremely grateful for that.
    However, I believe it is preferable to change the approach to problem-solving as suggested by Mr. Bharani Preetham. His proposal is to create a temporary table and populate the data in it, and use it in a way that is not tied to the PurchTotals model.

    Thank you once again for your valuable time in listening to me, and I hope you will be able to assist me in implementing this suggestion.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans