JuiceyBrucey wrote:"Do you think it possible that someone else added the item you created to a stock transfer?"
Yes, I did. I did not use the method described, I used the JIWA interface that shows products being transferred. No one would have touched this product anyway. It is clearly marked as "TESTING, PLEASE IGNORE, BRUCE". The ladies in the office know I am running all sorts of tests.
But you still didn't run the SQL script I provided to prove that it is not present on a stock transfer document. Run the damn query and report the result.
JuiceyBrucey wrote:The status of the inventory item changes to "locked" or "being transferred" etc, as soon as it is viewed. I can patch any item after viewing, or do several other operations, but I cannot delete.
No, you are incorrect. Just viewing the item does not change it. That inventory ID has to be on a stock transfer to get that error. If you run SQL Profiler to log all SQL queries during a call to your route you would see that. Have you tried that?
JuiceyBrucey wrote:In your step 2, the newly created inventory item was not pulled, so it was not locked.
Then it follows that it has not been viewed and therefore it can be deleted without any problem.
No, you are incorrect. Your plugin which introduces the /Custom/GetAllInventoryMinFields route merely performs a select query on IN_Main and this will not perform any locking and it won't put it onto a stock transfer document. By the way, that query is redundant as we already have built-in queries to retrieve exactly the same information.
JuiceyBrucey wrote:For the item to be locked, it must have been pulled via the plugin.
This item: 2ea9e7a0db2449a08f44 was not pulled, so it was not locked, so it can be deleted.
That is incorrect, it is not locked. And even if it was, my lack of issuing the right API call is entirely your fault - I asked you for exact steps to reproduce and you failed to provide the parameters necessary to reproduce your scenario.
You need to listen to what I am telling you and follow my guidance. Just pretend for a bit that I have some experience in how to troubleshoot, and also have a sound knowledge of the Jiwa platform.
I can guarantee that if you follow my guidance exactly and without alteration we'll find what you're doing wrong pretty quickly. Assuming I'm the idiot here and ignoring every second question or instruction I ask of you because you have incorrectly deduced that it couldn't possibly be relevant is not going to solve the problem.
My current likely reasons for your issue are:
1. Your delete operation is using the wrong InventoryID
2. Your delete operation is operating on the wrong database
3. The inventory item is on a stock transfer (and / or other documents) after all