Page 1 of 1

Inventory Category Update

PostPosted: Fri Apr 17, 2020 12:56 pm
by SBarnes
How can you tell when an inventory category is updated or added?

Re: Inventory Category Update

PostPosted: Fri Apr 17, 2020 1:18 pm
by Scott.Pearce
Look at it's .InsertFlag and .ChangeFlag properties?

Re: Inventory Category Update

PostPosted: Fri Apr 17, 2020 1:20 pm
by SBarnes
Are there save events on the category to attach to?

Re: Inventory Category Update  Topic is solved

PostPosted: Fri Apr 17, 2020 1:27 pm
by Scott.Pearce
Yes.

Code: Select all
JiwaInventory.Configuration.Category.Categories.SaveStart(sender As Object, e As System.EventArgs)


or

Code: Select all
JiwaInventory.Configuration.Category.Categories.Category1Collection.SaveStart(sender As Object, e As System.EventArgs)
JiwaInventory.Configuration.Category.Categories.Category2Collection.SaveStart(sender As Object, e As System.EventArgs)
JiwaInventory.Configuration.Category.Categories.Category3Collection.SaveStart(sender As Object, e As System.EventArgs)
JiwaInventory.Configuration.Category.Categories.Category4Collection.SaveStart(sender As Object, e As System.EventArgs)
JiwaInventory.Configuration.Category.Categories.Category5Collection.SaveStart(sender As Object, e As System.EventArgs)


No events on the Category object itself though it seems.

Re: Inventory Category Update

PostPosted: Fri Apr 17, 2020 1:36 pm
by SBarnes
Thanks Scott,

That'll do it I want to log that something has changed to send to an external system so I can roll over the collection and check the flags and based upon that log it.

Re: Inventory Category Update

PostPosted: Fri Apr 17, 2020 1:39 pm
by Scott.Pearce
SBarnes wrote:I can roll over the collection and check the flags and based upon that log it.


Yep, that's the way.