Work Order Instruction custom field

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Re: Work Order Instruction custom field

Postby Mike.Sheen » Thu Oct 07, 2021 3:59 pm

Danny,

This still isn't the plugin which demonstrates the reported problem.

It does, however, exhibit a different problem - when opening the Work Order form I get an error because you are newing an inventory entity instead of using the factory. You're also doing a Search inside the ReadData method for some reason. After fixing those issues in the ReadData method, I can load the Work Order form and clicking on the lookup on the instructions grid it works without error.

Attached is my changes to your plugin.

Perhaps there are some additional steps which I'm not doing to cause the problem? I'm just loading the Work Order form in demo data and putting in a new instruction and pressing the lookup button on that grid.
Attachments
Plugin Work order custom field - V2.xml
(32.18 KiB) Downloaded 519 times
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Work Order Instruction custom field

Postby DannyC » Thu Oct 07, 2021 4:08 pm

when opening the Work Order form I get an error

Interesting. I don't.

This still isn't the plugin which demonstrates the reported problem.

It's the exact plugin. Not even edited anywhere (aside from my System.Diagnostics.Debugger.Launch line).

You're also doing a Search inside the ReadData method for some reason

I had that remmed out for most of my development to avoid throwing any spanners in. I'm mainly just concentrating on the ButtonClicked.

I'm just loading the Work Order form in demo data

Me too.

I'll try the V2 version and see what happens. I actually really appreciate the help.
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Work Order Instruction custom field

Postby DannyC » Thu Oct 07, 2021 6:08 pm

Lightbulb moment...you're gonna hate me.

On a instruction line, I was going directly to the lookup, hadn't entered any text yet.
If I firstly enter in some text then do the lookup, the CustomFieldValue isn't null. Makes sense now.

Phew, sorry 'bout that. :oops:
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Work Order Instruction custom field

Postby Mike.Sheen » Thu Oct 07, 2021 6:24 pm

DannyC wrote:
when opening the Work Order form I get an error

Interesting. I don't.

This still isn't the plugin which demonstrates the reported problem.

It's the exact plugin. Not even edited anywhere (aside from my System.Diagnostics.Debugger.Launch line).

You're also doing a Search inside the ReadData method for some reason

I had that remmed out for most of my development to avoid throwing any spanners in. I'm mainly just concentrating on the ButtonClicked.

I'm just loading the Work Order form in demo data

Me too.

I'll try the V2 version and see what happens. I actually really appreciate the help.


But you mustn't have saved the plugin after remming out the code for the ReadData and exporting it - go look at the plugin you posted - there is code in the ReadData which is just plain wrong and should not be there, and prevents the work order form from loading - and after fixing the problem line of code it then loads a search window for each instruction when reading a work order. It's obviously remnants of ButtonClicked code incorrectly placed in the ReadData method - but it indicates that what you posted for me to test with wasn't what you actually tested with.

DannyC wrote:Lightbulb moment...you're gonna hate me.

On a instruction line, I was going directly to the lookup, hadn't entered any text yet.
If I firstly enter in some text then do the lookup, the CustomFieldValue isn't null. Makes sense now.

Phew, sorry 'bout that. :oops:


No problem - we all make mistakes. You can just check for CustomFieldValue being null in the ButtonClicked and not do anything in that case.

This does highlight how spending a little effort in properly preparing everything we would need to see the problem can save everyone a lot of time.

When I report problems to our own software suppliers, I go to great lengths to make it as easy as possible for them to replicate for themselves the problem I am having - because if they can't repro the issue then they can't do anything.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Previous

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest