Add default warehouse, lead time and min. order quantity to EcoResProductDetails form

I want to retrieve default warehouse from invent item purchsetup, purchase lead time from invent item purch setup and min. order quantity from reqitemtable to ecoresproductdetails form [Moved from the title by a moderator.]

How can I establish join source and linktype property of datasource between the tables “Invent table” “Invent Item PurchSetup,” and “ReqItemTable” in order to retrieve information such as the default warehouse, purchase lead time, and minimum order quantity to display in “EcoResProductDetails” form’s data source when i insert columns these 3 fields should show up.

Moved from the technical forum about Business Central / NAV here, to the developer forum about F&O / AX. Now it becomes visible to the right audience.

Please give us more context. It seems that you’re trying to join or link form data sources. Are you saying that you have no idea how to use data sources, or do you know the basics and you have some problem specific to your scenario? In either case, knowing the problem is needed before a solution can be provided.

Is your question about F&O or AX 2012? You attached tags for both, but the approach of changing standard forms is very different in these products.

I know the basics how how join source works and the link type- delayed,inner join, outer join.
But my requirement is to get the default warehouse from purchsetup. when i try to change the warehouse it is not getting changed in ecoresproductdetails form

Are you saying that you implemented something which is fetching a warehouse, but it’s a different warehouse, therefore your query is wrong but you have no idea how to figure out what your query actually does?

By the way, I still don’t know which product we’re talking about (F&O or AX 2012).

hey yes I have added 3 datasources to ecoresproduct details form , that is inventpurchsetup, Reqitemtable and inventdim table and i want to display purchase lead time , minimum order quantity and default warehouse from the respective table. but when i added these 3 datasource and for inventpurchsetup ds i have given join source has invent table and delayed link type, for Reqitemtable ds joinsource is inventpurchsetup and linktype is innerjoin , for inventdimtable ds join source is inventpurchsetup and linktype is inner join.

but my issue is i am getting duplicate records and the warehouse is not getting picked from purchsetup

Let me ask for the third time: are you using D365FO or AX 2012?

Whether you should use a join or a link (such as delayed) depends on what you want to achieve. Please explain your requirements to us. Do you want to see values just for the single selected item (which is the simpler scenario) or multiple items in a grid?

There may be duplicates - it’s not true that there is always exactly one record of default order settings or ReqItemTable for each item. If you thought so, your design is logically wrong.

It’s not clear to me why you’re trying to join ReqItemTable to InventPurchSetup. What is sure is that it can’t work automatically, because there is no such a relation.

1 Like

I am using d365FO. I want to fetch the values in default order setting and item coverage displayed in the ecoresproduct details form, so when i make any changes to the warehouse in default order setting the value should be updated in the ecoresproductextended form.

Thank you for the information about the product.

Now let me repeat the new question, because your reply didn’t address it: Do you want to see values just for the single selected item (which is the simpler scenario) or multiple items in a grid?

And there are also other points in my previous reply that you’ll need to address sooner or later.

I’m trying to help you, but you don’t make it easy.

1 Like

I want the values to be displayed as fields when i insert the particular column for all the items present in the Ecorestproductdetails(I want the fields in datasource not in grid so that i can use insert column and add the field to the form). I have no idea how to join the datsource to retrive the particular fields that i mentioned. And my lead told me the duplicates is something to do with primary key index, which i am not able to figure out

I’m sorry, but I’m still not sure what the answer is. Are you saying that you need it just for a single item at once? Let’s say on the Purchase fast tab.

The duplicates are caused by two bugs I already mentioned:

  1. There may be multiple records for a single item. You’re wrong if you believe that they can’t.
  2. There is no relation between ReqItemTable and InventItemPurchSetup, therefore you’re getting all ReqItemTable records.

Your sentence “I have no idea how to join the datsource to retrive the particular fields” suggests that you shouldn’t be changing the form and hoping for getting the correct result. Stop that and first design the query to use. It includes deciding how you’ll deal with multiple InventItemPurchSetup and ReqItemTable related to the item.

1 Like

In purchase tab there is a field called default warehouse and lead time i want that to be displayed in ecoresprodutdetails form.