Alternate PartNo searching  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Alternate PartNo searching

Postby neil.interactit » Mon Sep 16, 2024 4:09 pm

Hi,

A client has a requirement to search on alternate part numbers. (Note this does not involve the Jiwa alternate part numbers). Specifically, they have a long established inventory custom field "Alternate Part", when a part number changes, they copy the existing partno to alternate part, then update partno.

The requirement is on SOE, when typing a partno directly into the grid (ie. without the lookup popup), if the partno exists - proceed as usual, if the partno does not exist - search altpart instead and if found substitute partno and proceed as usual.

All the altpart searching and partno substitution logic is fine.

I'm stuck on intercepting the current Jiwa SOE inventory search process.

At a BL level, I have tried AddInventoryItemStartEventHandler(InventorySeed, InventorySeedType, ref NewKey, KitHeader, LineNumber) but unfortunately InventorySeed is passed by value not by ref so I cannot alter it.

At a UI level I have tried GrdLines_LeaveCell / GrdLines_Change / GrdLines_KeyPress / GrdLines_KeyDown (intending to modify the partno text if needed), but the partno search either fires before or inhibits these.

Could you point me in the right direction to correctly intercept in order to add this functionality?

Cheers,
Neil
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Alternate PartNo searching  Topic is solved

Postby Scott.Pearce » Tue Sep 17, 2024 3:36 pm

What if you add your handler for GrdLines_Change in the SetupBeforeHandlers method?
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: Alternate PartNo searching

Postby neil.interactit » Wed Sep 18, 2024 6:04 pm

Perfect!

Many thanks Scott.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Alternate PartNo searching

Postby Mike.Sheen » Wed Sep 18, 2024 6:08 pm

If you don't know about this already, we created a brief guide to developing plugins which might be worth spending 10 minutes reading through - we even have a section specifically on SetupBeforHandlers : https://jiwa.atlassian.net/wiki/spaces/J7UG/pages/76906497/Plugin+Development+Guidelines#SetupBeforeHandlers
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: 2485
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 769


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 5 guests

cron