Getting Supplier info from Inventory objects  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Getting Supplier info from Inventory objects

Postby pricerc » Fri Jun 16, 2017 1:54 pm

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
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Getting Supplier info from Inventory objects  Topic is solved

Postby Mike.Sheen » Fri Jun 16, 2017 5:31 pm

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
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 15 guests