Skip to main content
Answer

Can't delete sub account

  • February 3, 2022
  • 3 replies
  • 297 views

Can’t delete a sub account. Can’t figure out where to find the rest of them so i can delete them.

 

 

2/3/2022 6:54:58 PM Warning at ParentDeletingHandler.cs:159:RaiseConstaintViolationException():
Subaccount (00  -   -) cannot be deleted because it is referenced in multiple tables.
 1: Currency (USD) - Foreign key Currency(aRProvSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 2: Currency (USD) - Foreign key Currency(aPProvSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 3: Location (118, MAIN) - Foreign key Location(cSalesSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 4: Location (118, MAIN) - Foreign key Location(cDiscountSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 5: Location (118, MAIN) - Foreign key Location(cRetainageSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 6: Location (118, MAIN) - Foreign key Location(cFreightSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 7: Location (118, MAIN) - Foreign key Location(cARSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 8: Location (118, MAIN) - Foreign key Location(vExpenseSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 9: Location (118, MAIN) - Foreign key Location(vRetainageSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 10: Location (118, MAIN) - Foreign key Location(vDiscountSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 11: Location (118, MAIN) - Foreign key Location(vAPSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 12: Location GL Accounts (118, 116) - Foreign key LocationARAccountSub(cARSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 13: Location GL Accounts (118, 116) - Foreign key LocationARAccountSub(cRetainageSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 14: Location GL Accounts (118, 116) - Foreign key LocationAPAccountSub(vAPSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 15: Location GL Accounts (118, 116) - Foreign key LocationAPAccountSub(vRetainageSubID) references Sub(subID), with Restrict-behavior, achieved by DeclareReferenceAttribute
 

Best answer by apanchamia

Sub accounts once used in a released transaction cannot be deleted. Consider renaming them.

3 replies

apanchamia
Acumatica Employee
  • Acumatica Services Team
  • Answer
  • February 6, 2022

Sub accounts once used in a released transaction cannot be deleted. Consider renaming them.


steverobison
Freshman I
  • Freshman I
  • May 16, 2025

How can a subaccount be renamed?


Forum|alt.badge.img
  • Jr Varsity III
  • May 17, 2025

@steverobison You CAN rename the segment value (code) ONLY IF:

  • It has NOT been used in any transaction.

  • It has no references elsewhere (this depends on your Acumatica version and restrictions).

  • The system does not lock the segment value after first use.

If the segment value has been used, renaming is generally not allowed directly via the UI.

This is because it will affect all historical subaccount codes that include that segment, which could compromise data integrity.