Monday 16 November 2015

Delete legal entity AX 2012, AX 2012 R2


Many times there is situation occurs where it is require to delete the Legal entity which are unnecessary in AX. AX disable the delete button on Legal entity form. I followed the below steps as I am not concern for my transaction data. Please verify the transaction data before applying below steps.

  1. Go to Legal Entity form and Select the entity and Click delete. Make sure that current legal entity must be other than selected.If found error try below steps
  2. Go to legal entity which you want to delete and Run, Class > SysDatabaseTransDelete
  3. Open table “Batch” and "BatchJob" delete the batch lines related to entity which you want to delete.
  4. Do step 1 again.
whan i did the above steps one more thing i found that legder transactions are not cleaning up and it want let me move further.

So also verify that the class SysDatabaseTransDelete has the method deleteGeneralJournalEntryTable. This method delete the ledger transactions.

Share your comments below if this helps you.

3 comments: