Page 1 of 2
BoM Quantity - gets reset

Posted:
Wed May 06, 2020 1:29 am
by Riyaz
Hi There
We are doing some calculations to the quantity field of the input section in the BoM screen, via the change event, what happens is that the values in quantity gets reset when we save the BoM. I have also checked with a messagebox in the SaveEnd event, and the values of the quantities were shown correctly, but when it saves, it just resets to some random values. Can you pls advise on this. The change event is called as below
GridObject.Change += (sender, e) => Change(sender, e, billMaintenanceForm.OutputsJiwaGrid, billMaintenanceForm.CustomFieldsGrid);
Re: BoM Quantity - gets reset

Posted:
Wed May 06, 2020 12:00 pm
by Riyaz
Hi Again
To update on this, might have found the cause, if I manually update the input it calculates the Total Line Cost etc and everything retains on save. But if I do the calculations via plugin for both quantity and total line cost, it reverses to 0s on Save. Can we trigger the quantity change also when we update the quantity value so it'll calculate the line cost itself. That might fix it.
Or is there any other, pls advise, as this is causing lots of issues.
Re: BoM Quantity - gets reset

Posted:
Wed May 06, 2020 12:32 pm
by Mike.Sheen
Hi Riyaz,
You're not giving enough information to be able to comment.
We use the same objects and classes you do for the Jiwa application and we don't have any issues like you describe - the problem must be how you are using our objects. Without some sample code we can run to reproduce the error, I can only guess what might be causing the problem.
Mike
Re: BoM Quantity - gets reset

Posted:
Wed May 06, 2020 12:54 pm
by Riyaz
Hi Mike
Have attached the plugin for your reference, its only a draft hence kindly ignore the formatting
Re: BoM Quantity - gets reset

Posted:
Wed May 06, 2020 5:22 pm
by Mike.Sheen
Ok, so your problem is you are pushing values into the grid cell contents instead of setting a property of the business logic.
The business logic properties is what you should be setting - the grid is merely a UI component and setting the cell contents of the grid isn't causing that to be sent back to the business logic.
Is that enough, or do you need guidance on how to set the appropriate properties in the business logic?
Re: BoM Quantity - gets reset

Posted:
Wed May 06, 2020 5:23 pm
by Riyaz
Thanks Mike
I would appreciate some guidance pls
Re: BoM Quantity - gets reset

Posted:
Thu May 07, 2020 8:42 pm
by Riyaz
Hi Mike
Just a kind reminder on this, thanks
Re: BoM Quantity - gets reset

Posted:
Fri May 08, 2020 2:43 pm
by Riyaz
Hi Mike
Is this possible today?
Re: BoM Quantity - gets reset

Posted:
Fri May 08, 2020 3:28 pm
by Mike.Sheen
Riyaz wrote:Hi Mike
Is this possible today?
Hi Riyaz,
My working days have been scaled back and so I don't work Friday's. I'm also pretty busy moving office and home - plus there are other forum posts which were well before yours I still have to get to.
So, sorry - no - I cannot do this today. If you want to log a ticket on our helpdesk we can quote the job and get it actioned ASAP - but for my time gratis you will need to wait a bit longer.
Mike
Re: BoM Quantity - gets reset

Posted:
Fri May 08, 2020 5:10 pm
by Scott.Pearce
I'm having a look at it. I've noted a couple of bugs in the Manufacturing code though which is causing me to have to jump through a few hoops to make this work...