Hi, this is not a bug, BC has no idea that a cost centre belongs to the balance sheet. Dimension values are only codes, there is no link to the account type, so nothing blocks the combination on its own.
The control you want is Default Dimensions on the G/L account. Put the dimension there with Value Posting set to Same Code and only that value is accepted, or use a filter if a few values are allowed. Code Mandatory just forces something to be entered, it doesn't limit which one.
For a whole range of accounts don't do them one by one, mark the lines in the Chart of Accounts and use Default Dimensions - Multiple.
Dimension Combinations is something else, that blocks one dimension against another dimension, not against the account.
Glad to help - follow up if anything is unclear.
► If this solved it, marking it verified helps others too.
Regards,
Grigorios Mavrogeorgis
Business Central Consultant & AL Developer
Work: Gmsoft Limited
Blog: insidebusinesscentral
LinkedIn: linkedin.com/in/gregorymavrogeorgis