How to get SoH for a specific part number  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

How to get SoH for a specific part number

Postby gkov3 » Tue Nov 11, 2014 4:37 pm

Hi All,
I am having slight issue with API Jiwa 7 with Demo Database, not sure if I am using this the right way.

The problem is that I need to find SOH for a particular part number.

So, in my program I have loaded Jiwa, logged in, and then loaded the Inventory module as below.

var invModule = app.BusinessLogicFactory.CreateBusinessLogic<JiwaFinancials.Jiwa.JiwaInventory.Inventory>();

After the loading the module I searched for a particular part number using the record id and it returns true.

if (!invModule.Find(IJiwaNavigable.ReadModes.Actual, "IN_Main.InventoryID", line.InventoryID, "")){
throw new Exception("Unable to find inventory item:" + line.InventoryID);
}

Next when I try to use invModule.SOHCollection to get the list of SOH, but it returns an empty collection.

If I check the Jiwa Application (GUI), it show the SOH items for the searched part number.

Is this the right way of getting list of SOH or I am doing this the wrong way?
gkov3
Occasional Contributor
Occasional Contributor
 
Posts: 13
Joined: Tue Nov 11, 2014 4:10 pm
Location: Melbourne, VIC
Topics Solved: 1

Re: How to get SoH for a specific part number  Topic is solved

Postby Scott.Pearce » Tue Nov 11, 2014 5:15 pm

This is because we use lazy loading. Only when you click on the appropriate tab on the Inventory UI is the business logic told to load SOH information. This provides us with performance benefits. In your case, you should instruct the business logic to load the SOH information by issuing the call:

invModule.SOHCollection.Read(True, Nothing);

Reference documentation here
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 748
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 225

Re: How to get SoH for a specific part number

Postby gkov3 » Tue Nov 11, 2014 5:40 pm

Thank you Scott. All good now.
gkov3
Occasional Contributor
Occasional Contributor
 
Posts: 13
Joined: Tue Nov 11, 2014 4:10 pm
Location: Melbourne, VIC
Topics Solved: 1


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 7 guests

cron