Monday, September 26, 2022

Can not delete Main Account in D365FO. Main account XXXXXX is used 10 times as a default account on the Item groups(InventItemGroupForm) table in the Main account field.

When You try to delete Main Account and got error log as below: 



Main account Z116101 is used 10 times as a default account on the Item groups(InventItemGroupForm) table in the Main account field.

A financial dimension value is based on the Z116101 record and has been used on a transaction. You cannot delete the Z116101 record

But in Item Group setup form (or in Inventory posting) the Main account is not exist (not used by any Item group).


Solution for my case, 

 I had customized table : InventItemGroupForm, then show (visible) field: ItemGroupId.



Item Group Id: STG02A, is not shown on form. 

To delete the data in table InventItemGroupForm, create Item group Id with form InventItemGroup, use value: STG02A.

After you created item group id, all records related to Item group Id is deleted, then you can delete the Item group Id and delete the Main account related.