Back to Blog List

How I found $14,535 of (phantom) inventory!

Having inventory allocated must be a very good thing, you are going to sell and will be in your Accounts Receivables soon.


But, how about if for some reason, you have inventory allocated and cannot be sold because it is in an order that got stranded, cannot be opened in GP or deleted and your customer service cannot sell it, then is a terrible issue, you bought it for the luxury of having inventory on the shelf.

That will take my sleep.

The following script will detect not just Sales Documents with allocated inventory but all stranded documents:

WARNING: Might not be phantom, might be a user entering an order, so make sure no one is in the system or in the SOP Module before running this script to provide accurate results


NOTE: You might need also to check for phantom inventory transaction records in IV10001 and SOP10200 (Check with your partner)


Let’s recover that inventory and make it available.

As every GP consultant will tell you, do not write directly to the database, in some situations, SOP Transaction Entry will not allow you to even open the document so it can be deleted, this script will ONLY allow you to open the document so you can delete/void them.

NOTE: Before you run this update statement, make a note from the previous script the orders that have the problem so you can remove them



This will not delete the orders, just allow you to open the orders in the SOP Transaction Entry and you can dispose them, it is GP who needs to unallocated the orders.

TGP Trick (This is for customers with TitaniumGP)

Pasting this sample template in the SOP Transaction Entry window. will allow you to void or delete Sales documents in GP:




Welcome to the Dynamics GP User Group [GPUG], we’re so glad you’re here! While we realize you may be here to troubleshoot a technical issue or simply learn new tips and tricks, we’d love the chance to share with you the incredible benefits the User Group has to offer [and don’t forget, if you’re interested in an incredible in-person learning opportunity - join us in Nashville for our Summit event]!