Page 1 of 1

Getting Supplier info from Inventory objects

PostPosted: Fri Jun 16, 2017 1:54 pm
by pricerc
I'm wanting to read/modify supplier warehouse information for an inventory object (or entity).

I've found JiwaApplication.Entities.Inventory.Inventory and JiwaApplication.Entities.Inventory.Supplier, and figured out that I can use the latter's ReadRecord(CR_Main_RecID As String, IN_Main_recID As String) to get to an Inventory/Supplier record from where I can then get to the warehouses for an inventory item.

Is this the right approach, or is there a smarter one?



/Ryan

Re: Getting Supplier info from Inventory objects  Topic is solved

PostPosted: Fri Jun 16, 2017 5:31 pm
by Mike.Sheen
pricerc wrote:Is this the right approach, or is there a smarter one?


There's nothing wrong with that approach.

If you were say, doing this inside a loop whilst reading 10,000 inventory ID's from the database - then you'd be better off just modifying a your query to join in the required tables and retrieve the data - otherwise you'd being throwing 10,001 queries at the server instead of 1 - which at worst might take 10 seconds instead of 0.001 seconds. For some people that would be an issue, for others no issue.

Mike