Business Central: "Select a Dimension Value Code for the Dimension Code"
Select a Dimension Value Code for the Dimension Code for Customer Business Central
Also searched as
- business central dimension value code mandatory error posting
- business central default dimension code mandatory same code no code
- bc dimension combination blocked error
Short answer
Business Central stops the post because a Default Dimension for an account, customer, vendor or item has Value Posting set to Code Mandatory, and the document has no value for that dimension. Either supply the dimension value on the line or header, or change the Value Posting rule if the requirement is wrong. Dimension combinations and priorities can produce similar-looking blocks.
Applies to: Business Central online and on-premises, all recent versions
How to fix it
- 1Read the message: it names the Dimension Code (for example DEPARTMENT) and the record that requires it (a G/L account, customer, vendor, item, or the like).
- 2Open that record and choose Navigate, then Dimensions (or Default Dimensions). Find the row for the named dimension and read the Value Posting column.
- 3If Value Posting is Code Mandatory, set a Dimension Value Code on the document line, or on the header for header dimensions, and post again.
- 4On sales or purchase lines use the Line, then Dimensions action. On journal lines add the dimension columns through Personalize, or use the Dimensions action on the line.
- 5If the requirement is no longer needed, change Value Posting to blank, or to No Code, on that default dimension. Do this on the correct record, not the document.
- 6If several records require different values for the same dimension, check Default Dimension Priorities under Finance setup to see which source wins.
- 7If you see a message about a dimension combination being blocked instead, open Dimension Combinations and correct the matrix for the two dimensions involved.
- 8Retry the post. For automated postings through API or Excel imports, fix the source file so it supplies the dimension.
What Value Posting means
Each Default Dimension row has a Value Posting setting. Blank means no restriction. Code Mandatory means every entry that touches that account or master record must carry a value for the dimension. Same Code means the entry must use exactly the default value shown on the row. No Code means the entry must not carry any value for that dimension.
The error you see is triggered by Code Mandatory when the document or journal line has no value for that dimension at posting time. Same Code and No Code give their own, different messages when a value is present but wrong.
These rules are enforced at posting. You can enter and release a document and only meet the error when you press Post. That is normal, and the reason finance teams ask for the mandatory dimension to be populated automatically from the customer or item default.
Why the dimension is empty
Dimension values flow from master records onto documents when the document line is created. If the default was added to the customer after the document was created, the existing lines do not pick it up. Re-enter the customer number or use the dimension action to refresh the values.
Imports and integrations are the other big cause. A configuration package, an Excel paste or an API call that creates journal lines usually bypasses default dimension logic, so the dimension columns arrive blank. Add the dimension fields to the source file, or set them with a defaulting step before posting.
Also check the Global Dimension 1 and 2 setup on General Ledger Setup. Shortcut dimensions are only two of the possible dimensions, and the others sit in the dimension set. A requirement on a non-shortcut dimension is easy to miss because it is not visible in the line columns.
Where to look: Search: Dimensions -> Dimension Values Customer/Vendor/Item card -> Navigate -> Dimensions G/L Account card -> Dimensions (Value Posting column) Search: Default Dimension Priorities Search: Dimension Combinations
Priorities and combinations
A single line can pick up dimension defaults from several sources, for example a customer, a salesperson, and an item. When two sources give different values for the same dimension, Default Dimension Priorities decides which wins by source table and priority number. Unexpected values usually mean two sources disagree and the lower-numbered priority is winning.
Dimension Combinations is a different control. It is a matrix that marks pairs of dimensions as limited or blocked, so that a DEPARTMENT value cannot be posted together with a PROJECT value, for example. A blocked pair raises a message about a dimension combination, not about a missing value.
When you troubleshoot, separate the three controls: Value Posting (is a value required), Priorities (which value is chosen), Combinations (may these values co-exist).
Common pitfalls
- !Changing Value Posting on the wrong record, for example the customer when the G/L account is the one that requires the code.
- !Expecting existing document lines to update after a default dimension was added to the master record.
- !Importing journal lines that never carry dimension values, then failing every line at posting.
- !Overlooking non-shortcut dimensions that are only visible in the dimension set, not in line columns.
- !Unblocking a combination without asking finance whether the restriction was deliberate reporting control.
How an ERP-grounded AI assistant handles this
The hard part is finding which record imposes the rule. A grounded assistant can read Default Dimension rows across G/L accounts, customers, vendors and items, report which one has Code Mandatory for the named dimension, and show the priority order. ERPray does this read-only through the user's own role and shows its query. Changing the rule or the value is still a person's decision, with finance's agreement.
Frequently asked questions
What does Code Mandatory mean on a default dimension?
It means any entry posted against that account or master record must carry a value for that dimension. If the document line has no value, Business Central refuses to post and asks you to select a dimension value code. The rule is enforced at posting time rather than when you type the line.
Where do I fix a mandatory dimension on a G/L account?
Open the G/L account card, choose Dimensions from the Account menu, and look at the Value Posting column for the dimension named in the error. Set a value on the document, or change Value Posting to blank if the requirement is not needed. Agree the change with finance first.
Why does my imported journal fail on dimensions?
Imports and API calls often bypass the logic that copies default dimensions onto lines, so dimension columns arrive empty. Add the dimension fields to your file or payload, or populate them in a step before posting. Otherwise every line with a mandatory dimension will fail at posting.
Is a blocked dimension combination the same error?
No. A blocked combination is a separate control in the Dimension Combinations matrix and raises its own message about two dimension values that cannot be posted together. Missing values are governed by Value Posting. You fix the combination matrix or the values, not the Value Posting rule.
Related
Business Central: "Posting Date is not within your range of allowed posting dates"
Business Central blocks the posting because the document's Posting Date falls outside the Allow Posting From / Allow Posting To window. The window is read from the user's own row in User Setup first, and from General Ledger Setup only when the user row is empty. Fix the date on the document, or widen the right window, or change your work date if the wrong default was applied.
Error fixBusiness Central: "Another user has modified the record after you retrieved it"
Business Central uses optimistic concurrency. Every record carries a row version, and a write is rejected if the stored version no longer matches what you read. For users, refresh the page and redo the edit. For developers, read and modify in the same short transaction, use LockTable or the right read isolation, and send an If-Match ETag from API clients.
How-toCreating and selecting custom report layouts in Business Central
Business Central reports can render through a Word layout (simple, single-level documents like invoices) or an RDLC layout (complex, multi-level, grouped reports). Custom layouts are uploaded and assigned per report through the Report Layout Selection page, or shipped inside an AL extension with the rendering(...) property.
Error fixFixing "Cannot create a record in (table). The record already exists" in D365 F&SCM data entity imports
This is the standard kernel duplicate-key exception, thrown when the Data Management Framework tries to insert a staging row into a target table whose unique or alternate key already matches an existing record. It almost always means the entity's insert-vs-update logic did not recognize the target row as an update, not that you have a true accidental duplicate in your source file.
Error fixFixing "There are currently no batch servers available for processing" in D365 F&SCM
This message means the batch framework cannot find any AOS instance flagged as a batch server and available for the batch group the job is assigned to. The fix is almost always in server configuration (System administration > Servers) or batch group assignment, not in the batch job itself.
Error fixFixing "You do not have the following permissions on TableData (table): (permission)" in Business Central AL
This runtime error means the current user's assigned permission sets do not grant the required Insert, Modify, Delete, Read, or Execute right on that specific table. It is most common right after installing or updating a custom AL extension, because Business Central checks object-level permissions even for tables an extension owns.
AI for ERPAI for Dynamics 365 Business Central, on-premises or SaaS, beyond Copilot
AI for Business Central beyond Copilot: grounded question answering over BC's data via OData and APIs, for on-premises and SaaS tenants alike.
AI for ERPAI for Business Central manufacturing operations, beyond Copilot
AI for Business Central manufacturing beyond Copilot: grounded answers on production orders, routings, and capacity via APIs v2.0, on-prem capable.
Stuck on Microsoft Dynamics 365 Business Central?
Talk to engineers who work inside Microsoft Dynamics 365 Business Central every week, and who build private AI that answers these questions from your own ERP data.