Purchse Order Deletion

Hi All

How can i delete the Purchase order, if its status is received. I want to delete it completely from the system as it was never been created in the system.

Please advise.


Purchase Order with status received cannot be deleted until it is invoiced or turned again into a open order.

You need to reverse the posted packing slip - put negative quantity in receive now field and post the packing slip with receive now option in quantity parameter.

The Purchase Order will turn into open order - which can be deleted.

In AX 2012 you have an option even to cancel the posted packing slip. Which was not there in the earlier versions, where you need to do the above.

But it is showing in the Item Transaction. I want to fully flush it out from the sytem, is there any way.

NO. It is not possible. You cannot delete the inventory transactions in this case, as it makes an update to the inventory.

When you post a packing slip with negative quantity it will not modify the existing line rather it will create a new inventory transaction.

thats i understand we are simply nullify the value by entering the -ve value.There must we some way by cancelling the voucher then delete that voucher then can delete the PO.There must be something.

No there is not, from an audit perspective it has to stay. Once posted it is posted, you presumably went through lots of working practice controls prior to getting to this point - what is the issue with it? If it is deleted the remaining transaction net to zero so there is no issue. Unless it is related to your item stock UOM post of course!

actually i am implementing a new project and for test i make that transaction so want to delete it. I can delete it from back end but i dont know the all tables so want to delete it from front end.If u can tell me the tables i will delete it from back end.

Probably you need to delete all the transaction - not some transactions which can lead to data in consistency.

Use SysDatabaseTransDelete class to delete all the transactions.

but in that i will also lose the opening bances which i entre from movement journal, i only want to delete the purchase order as rest testing i did on test company.By studying the database i found the following table from where data can be deleted:










Kranthi can u tell me how can i use this SysDatabaseTransDelete class to delete all the transactions.

I have use this SysDatabaseTransDelete class and all the transactions get deleted.Thank You so Much Kranthi. But if possible plz post the answer for PO.

If all the transactions are deleted you can delete teh PO - not sure what you want Kranthi to clarify here, can you restate the question?

my question was, i want to delete the purchase order only when its status is received. As earlier in the post Kranthi told it is not possible from front end, i agree .While seeing the database i found the above define tables so i want to know can i delete the po from these tables or more tables are required.Just for the sake of knowledge as right now i used sysdatabasetransdelete class as i have to delete the whole trans but may be in future i may required to delete the single one only.

Never delete a single posted transaction, auditors will not like it and it will impact on the integrity of your database, just do not do it.

You will also have document and the status related tables. eg: VendPackingSlipJour - in case of Packing slip.

Try to debug the code to know how and which tables get updated.

Do it for knowledge sake and not with an intention to delete[:)]

ok thanks you very much

ok thank you very much