web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    If issue is resolved, please mark helpful answers as verified so that it can help anyone in future facing same issue.
  • Suggested answer
    Ali AbdAlNasser Profile Picture
    405 on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    Hello everyone,
    I would like to express my utmost appreciation for your cooperation and assistance in your attempts to solve the problem I mentioned in the question. As I mentioned before, I was facing an issue due to my lack of knowledge in working with the system, and my expectations were met after several attempts. I finally managed to identify the reason for my inability to retrieve the required data.
    The first reason: I was trying to fetch the data without using any joins, and that's why the rows I needed weren't appearing. The available rows are displayed in payable > Purchase orders > All purchase orders > Maintain charges.
    The second reason: I was using a join to fetch data from the MarkupTrans table using the Common data source, and this was preventing any data from being displayed. I believe the reason for this issue is the absence of matching data between the two tables.
    The solution: It seems that the solution was very simple. I needed to call the MarkupTable and perform a join from the MarkupTrans table to the MarkupTable, specifying the join type as InnerJoin. This way, the data will appear in the desired format.
     
    Thank you all, and I apologize for my lack of knowledge. Once again, I appreciate your valuable time.
    Best regards,
    Ali Abdul Nasser.
  • Ali AbdAlNasser Profile Picture
    405 on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    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.
  • Ali AbdAlNasser Profile Picture
    405 on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    Hello Layan Jweihan,
    From this path, I open the PurchTotals form.
     
     
  • Ali AbdAlNasser Profile Picture
    405 on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    Hello Waed Ayyad,
    I have tried all types of membership and none of them have worked.
  • Layan Jwei Profile Picture
    7,995 Super User 2025 Season 2 on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    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
  • Suggested answer
    Waed Ayyad Profile Picture
    8,823 Super User 2025 Season 2 on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    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
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    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.
  • Ali AbdAlNasser Profile Picture
    405 on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    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.
  • Layan Jwei Profile Picture
    7,995 Super User 2025 Season 2 on at
    Get all rows from the MarkupTrans table into a Grid in the PurchTotals form
    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

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 665 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 595 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 558

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans