AX2012 – Delete Ax Transactions


So there are apparently times when you would want to delete the transactions from the Ax 2012 installation, keeping all the parameters and configurations intact.

Ax has always had a class called SysDatabaseTransDelete which help in deleting the transaction tables. There are however rules on how and why it deletes them which can be followed by viewing that class.

In my Ax2012 cu7 environment I created a job which implements the same concept like the class, but outputs the result to a CSV file for you to analyze what will be deleted and what wont along with the record count. The record count is however company specific, so i would encourage you to dig straight into SQL to find the tables sizes and merge the results from there.

The Job in Ax 2012

Download the XPO and have a go at it.

It creates a File (hardcoded) in CSV format with the following header:

Table Group,Company Specific,Table name,SQL Table Name,Will be deleted,Row Count

Open the file in Excel, filter, sort, have fun.

What to learn from this

Table Group should be specified for every table that you create in Ax. If you leave it as miscellaneous, then Ax will never use it. This property is also used in analytics so its highly recommended to set this up.

Global Tables are not deleted by this unless handled specifically.

Advertisements

Leave a Reply / Comment

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s