Customize form display PurchLineOpenOrder

Hello everyone,

I need some help with customizing the PurchLineOpenOrder form in D365. I want to display the Accounting date and Vendor Name fields from the PurchTable table in the Overview tab of the form. However, the Overview grid is based on the PurchLine table, which does not have these fields. When I drag and drop these fields from the PurchTable data source into the grid, I only see one record instead of all the records. (See the attached image for reference.)

I am new to D365 and I don’t know how to fix this issue. I searched online and found some suggestions about using a chain of command, but I don’t understand how it works. Can anyone please explain it to me or give me some guidance? Thank you very much.

There is an important property that you must pay attention to in these cases. Look at PurchTable data source - you’ll see that its Join Source is PurchLine data source, as expected. But then look at Link Type - you’ll see it’s Delayed, which isn’t what you want.

The Link Type property may lead to two different things. Either the data sources are joined to a single query (values InnerJoin, OuterJoin, ExistJoin and NotExistJoin). If there was InnerJoin, it would mean that each line is joined to its order header and you can refer to header fields in the grid.

But there are also values Delayed, Active and Passive, which don’t make a join. Instead, there are two separate queries and the query for the child data source (PurchTable in this case) is filtered based on the currently selected record of the parent data source. Therefore PurchTable data source always contains just a single record. Using it in a grid with other order lines doesn’t make much sense. This data source is used on Purchase order tab to show details of the currently selected order.

I see two options:

  1. Either add an additional data source for PurchTable table, join it to PurchLine data source and use fields from this data source in the grid.
  2. Or change the link type property of the existing PurchTable data source from code.

Hello,

Thank you for your answer.

I checked the LinkType property of the PurchLine data source and you are right, it is set to Delayed. (See the attached screenshot for reference.)


However, this is a form extension, so I cannot modify the LinkType property in the property sheet. :disappointed:
How can I change it to another value, such as Active or Passive?

Yes, you can’t change the property value in the designed, that’s why I didn’t suggest such a thing and offered two other ways.

Also, as I explained, Active or Passive wouldn’t solve the problem. What you need is a join instead of a link.

Thank you for your answer. The solution works :+1: