Core BC / Dimensions BC Sales Order Posting (Default Dimensions, Value Posting = Code Mandatory) Microsoft Learn: Troubleshoot and correct dimensions (message template 'Select a %1 for the %2 %3 for %4 %5.'); Medius KB (same message from a BC integration)

Posting Fails: Select a Dimension Value Code for the Dimension Code

Raw System Error String
Select a Dimension Value Code for the Dimension Code DEPARTMENT for G/L Account 8100.

What It Means

Business Central refuses to post the order (or invoice) because one account or record on it requires a value for a dimension, and the document has no value for that dimension. Microsoft documents the message as 'Select a %1 for the %2 %3.' or 'Select a %1 for the %2 %3 for %4 %5.' In the UI the placeholders become the dimension code and the record that demands it, for example 'for G/L Account 8100' or 'for Customer 10000'. The order was imported fine; only posting is blocked.

Root Cause

A Default Dimension with Value Posting = 'Code Mandatory' exists for the record named in the message (a G/L account, customer, item, or a whole account type), and the dimension set on the document has a blank value for that dimension. Microsoft lists this exact case: 'Blank dimension value code for default dimension where the Value Posting field contains Code Mandatory'. Integrated orders hit this often because the integration does not set dimensions itself. For example, the Microsoft Shopify connector source (BCApps, Order handling) has no dimension logic: the sales document only gets the default dimensions of the customer, items, location and G/L accounts it uses. G/L lines that the connector adds (shipping charges, tips, sold gift cards) post to the G/L accounts set on the Shopify Shop Card, so a Code Mandatory rule on one of those accounts blocks every order that has such a line.

Step-by-Step Fix

  1. Read the end of the message: the record after 'for' (for example 'G/L Account 8100' or 'Customer 10000') is the one with the Code Mandatory rule. The dimension code before it is the one that is missing.
  2. Open the sales order. To fix the header, choose 'Dimensions' on the order. To fix one line, select the line and choose 'Line' > 'Dimensions'. Enter a dimension value for the missing dimension.
  3. If the record is a G/L account that only appears on a line (for example the shipping charges account), set the dimension on that line, not only on the header.
  4. Post the order again.
  5. Permanent fix, option 1: give the source a default value. Open the customer the integration uses (for Shopify: the Default Customer No. or the customers created from the Customer Template Code), or the G/L account, item or location, choose 'Dimensions', and enter the dimension with a Dimension Value Code. New documents then get the value automatically.
  6. Permanent fix, option 2: if the rule is wrong, open the record's Default Dimensions and change 'Value Posting' from 'Code Mandatory' to blank. Agree this with finance first, because the rule exists for reporting.
  7. If several sources give different values for the same dimension, check 'Default Dimension Priorities' for the sales source code so the right value wins.

Verification Steps

How to verify: The order posts without the dimension error, and the posted G/L entries show the dimension value (choose 'Dimensions' on a posted entry to check).

Sources & References

Early Access · 30-Day Sandbox Pilot

Stop Order Sync Failures Before Customers Notice

The Order Flow Doctor monitors Microsoft Dynamics 365 Business Central order flows across Shopify, EDI (TrueCommerce, SPS), 3PLs, and carriers. Get automated root-cause diagnosis and one-click fixes.

We respect your privacy. No spam. You will only be contacted when pilot slots open for your stack.