Delete master data

Hi All ,

AX 2012 R2

End user created a new main account / vendor / Customer / FA/ bank . Assume that using these data created some financial journals , but not posted . Now end user came to know that the data which had created was wrong . So tried to delete those master data.

An error occur: “A financial dimension value is based on the 1100 record and has been used on a transaction. You cannot delete the 1100 record”

I’ve deleted all Not posted journals those main accounts/vendors / Customers and financial dimensions and all account structures, but still the same error.

Until and unless go to the back end tables , end user can not delete those wrongly created master records.

Seems to be MS forgot the some basic concepts .

Just think in a End user point of view , how can user delete the main account / vendor account /Customer account with out going to back end table level as mentioned above ?

Share your experience.

The table structure of AX and the inter-related setup means that you cannot delete all records once you have started.

“When you add new records to financial dimension entities (Main account, Department, Cost center, etc.), they are merely available for use and can be immediately deleted. However, as soon as they are actually used, additional records are created in tables such as DimensionAttributeValue, DimensionAttributeValueCombination, DimensionAttributeLabelValue, and many others. Even if you then delete the journal line that referenced the new Main account, the fact that you have ever used it means that these records will exist forever. AX provides no mechanism for deleting these records. The only method would be with direct SQL, and the schema behind those tables is rather complicated.”

At the point you start creating these records you have taken a forward step, you would need to remove the supporting tables NOT from the UI - it is not a simple job and you need to understand all related tables which is why it needs to be done very carefully.

MS have not forgotten basic concepts here, they are enforcing them, not allowing deletion when supporting table entries exist. Whilst I understand this is an issue from your perspective and they could arguably have coded this better you work with what is there, so now you need to remove the supporting entries by code before deleting those records.

Quote reference: https://community.dynamics.com/ax/f/33/t/112739.aspx

Thank you steven for the reply,

I am did not understand the above sentence.

Just think in the end user point of view , how can user delete those records without touching the tables ?

As you know that End user does not have the access of AOT to view the tables and delete the records .

Thanks in advance.

When you add new records to financial dimension entities (Main account, Department, Cost center, etc.), they are merely available for use and can be immediately deleted. However, as soon as they are actually used, additional records are created in tables such as DimensionAttributeValue, DimensionAttributeValueCombination, DimensionAttributeLabelValue, and many others. Even if you then delete the journal line (presumably) that referenced the new Main account, the fact that you have ever used it means that these records will exist forever. AX provides no mechanism for deleting these records. The only method would be with direct SQL, and the schema behind those tables is rather complicated.

Who is the end user. you mean admin?

Hi Faiz ,

Your label shows as E-soltutions EXPERTS , but you do not know the who is end user ? Bit funny .

Why did you copy the content of Mr. Steven and posted again ?

you have to make a utility for this.

The solution mr . Steven provided you is perfect . In dynamics ax even admin rights also restricted. it is totally depending on how you do setups.

“Just think of it from the end user point of view” - the answer simply means they cannot do it. The table structure means once created you have gone too far and cannot back out, you need to get people in to remove the entries from the tables.

May i know your build number? join me on skype "faiz_fais

hi, check your build version. if you want to get rid of this issue, you have to update your build version to this one " #6.2.1000.4051" . for more information read this KB 2885603.

HI Faiz,

Thank you for the updates.

Could you share me the link ?

The reference is CU7, can be found here: https://mbs2.microsoft.com/Knowledgebase/kbdisplay.aspx?WTNTZSMNWUKNTMMYVWQXNRNXTVKNSKYVROSSKZPSPPVYZUQN

I am not saying it resolves your issue however :slight_smile:

Thanks Adam ,

It is not showing any link regarding the master data deletion.

Faiz said it did, I just pasted the link to the KB [:D] That is the KB he says resolved the issue, I did not read it I just did the search work for you because you could not find the link despite him giving you the KB reference. I would suggest you look at the issue search in lifecycle services, it is very simple to use.

Hope it will work if you restor in sql the blank DB with out changing baseline and model store, try this in virtual so that it will be new DB to work.

Hope it works, I have not tested this yet.

Hi Faiz ,

I have searched for the KB , but did not find .

Could you share the KB URL or hot fix ?

The link I gave you was for the one he mentioned - type it into LCS issue search and it will return it.

Thanks Steven ,

I searched the same in LCS , but did not find that KB.

If you find , could you share the link ?

I shared it earlier in this post, click on it. The reference is CU7, so Faiz is saying you need to be on CU7 then you will not have the issue. I have not tested this, but you need to. Faiz also said you could contact him by skype in the post, so I suggest you do that if you want any more information from him on this matter.