Page 2 of 2

Re: Extending Inventory Import

PostPosted: Fri Jul 19, 2019 6:10 pm
by Mike.Sheen
SBarnes wrote:Thanks Mike,

I've actually moved on from the issue of custom fields as I discovered they are actually there in 7.2 at any rate, to the possibility of loading an image based a path in the cell and possibly doing the status update which of course would mean it needs to cancel back orders and close down open purchase orders but throw an exception for SOH.


I must be tired because I don't understand how any of that relates... did you post on the wrong topic?

Re: Extending Inventory Import  Topic is solved

PostPosted: Fri Jul 19, 2019 6:15 pm
by SBarnes
No right topic

The inventory import screen already supports custom fields, I was told it didn't, it doesn't take in an image on insert and when it does an update it won't let you change the status to discontinued so plugin might pick up both of those options.

Re: Extending Inventory Import

PostPosted: Thu Jul 25, 2019 12:39 pm
by Mike.Sheen
SBarnes wrote:The inventory import screen already supports custom fields, I was told it didn't

Well, whoever told you that was wrong! Never listen to them again.

SBarnes wrote:it doesn't take in an image on insert and when it does an update it won't let you change the status to discontinued so plugin might pick up both of those options.

For every property being set, the Inventory business logic is still used, so the rules around what can be set to what and when still apply - so for the status, back orders, stock levels, sales order lines on open orders, purchase order lines on open purchase orders, stock transfer lines on open stock transfers are all considered when attempting to change the status.

The Picture property of the inventory item isn't able to be set with the standard import functionality, but it certainly could be quite easily via a plugin. It's just a byte array, so you could accept either base64 encoded string as a field in the CSV, or a file path, and have a plugin do what it needs to set the .Picture property of the inventory item. 10 minutes of work, tops!