Notifications
Announcements
No record found.
hello to all ,
in ax 2012 we want to delete all the transaction happened till date . kindly help me out on this concern .
i will wait for your suggestions .
thanks :)
*This post is locked for comments
Do you want to delete all transaction in a company. If so,please check this:
us.hitachi-solutions.com/.../dynamics-ax-delete-transactions-company
Hi Paras mehan
you can use clsass sysdatabasetransdelete for every legal entity
Hi Visvash,
Thanks for prompt reply.
Similar we need but we need to delete data between a time internal, as SysDatabaseTransDelete class will delete entire trans data
Hi Mahmoud ,
Thanks for getting back .
We need to delete data between a time internal, as SysDatabaseTransDelete class will delete entire trans data.
Kindly suggest me
Hi,
I don't think it exists in the standard. Can you let us know what sort/kind of transactions are you looking to delete.
In that case you have to write your own scripts .If you see class sysdataBaseTransDelete they are using dictionary class and go by tablegroup to find tables and finally use
"delete_From common" statement in deletetable method to delete data , You can modify this statement and include your time interval
delete_from common
where Common.ModifiedDateTime >= FromDate
&& Common.ModifiedDateTime <= ToDate;
Also make sure you use your dev environment for such a testing and do take database backup before executing this class , in case anything goes wrong and you need data.
Your request is not feasible. There is no universal way of determining when a transaction was specifically generated in such a granular relational database. Every table has a different date for that, like Created/ModifiedDateTime, TransDate, InvoiceDate, financial or physical posting date, and a dozen more. It would be extremely complex to write date range-based delete criteria for those.
So you either delete all, or your request cannot be achieved in a straightforward manner.
What are you trying to achieve? With the relational databasse structure, the related tables and transactions the requirement here is huge, but I see no real reason you would want to do this - can you explain more because the solution would be to look at each transactional table individually, analyse the date relation, decide what you want and write scripts for each table - I am sure there are rules you could make on related tables but it really is not that simple, look at Fixed Assets, GL balances, Costing, Production over periods, Projects over period, sales orders processed from initial transaction of entry through to payment and the same for purchase requisition through purchase order, receipt, invoice and payment across a period. I have not even mentioned elements like advanced warehousing, the list goes on.
Hi Paras Mehan,
Date field in different tables may have different name or may not exists at all, so this is not possible. You have to write your own code to delete data you want.
I doubt it could sensibly be done for an interval -what if a transaction crosses the interval?
If its to delete all transactions for the last week/month then it would be simpler to restore the relevant last good back up..
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2