{/response/: {/value/: [{/code/: /BER/,/displayName/: /MANAGED SERVICES - The Berkeley/,/id/: /2eb79c22-fccb-ee11-9078-002248079283/},{/code/: /CAD/,/displayName/: /Cheltenham Admin/,/id/: /0c3412b0-655c-ee11-8df1-6045bdc196c9/},{/code/: /CHE/,/displayName/: /Cheltenham Premises/,/id/: /155af99d-655c-ee11-8df1-6045bdc196c9/},{/code/: /GRA/,/displayName/: /Graduate Trainees/,/id/: /0061efdd-5864-ee11-8def-7c1e5203a3bc/},{/code/: /ITC/,/displayName/: /ITEC/,/id/: /4e291a7e-20e5-ee11-904c-6045bdf19c7d/},{/code/: /PAV/,/displayName/: /Production AV/,/id/: /babff6da-655c-ee11-8df1-6045bdc196c9/},{/code/: /PEN/,/displayName/: /Managed Services - Peninsula/,/id/: /3818aa79-9270-ed11-8c34-6045bd0b3046/},{/code/: /RAD/,/displayName/: /Reading Admin/,/id/: /801307a7-655c-ee11-8df1-6045bdc196c9/},{/code/: /RDG/,/displayName/: /Reading Premises/,/id/: /0b5af99d-655c-ee11-8df1-6045bdc196c9/},{/code/: /RWH/,/displayName/: /Reading Warehouse/,/id/: /8352d93d-0f74-ee11-8def-6045bdf1a661/},{/code/: /SDH/,/displayName/: /SFL Dry Hire/,/id/: /005e8bd2-655c-ee11-8df1-6045bdc196c9/},{/code/: /SIN/,/displayName/: /SFL Installations/,/id/: /20d357cb-655c-ee11-8df1-6045bdc196c9/},{/code/: /SPR/,/displayName/: /SFL Production/,/id/: /dc8c2ebe-655c-ee11-8df1-6045bdc196c9/},{/code/: /SSA/,/displayName/: /SFL Sales/,/id/: /f17740c5-655c-ee11-8df1-6045bdc196c9/},{/code/: /WEM/,/displayName/: /Managed Services - Wembley/,/id/: /90b7da17-fccb-ee11-9078-002248079283/}]}}
GET https://api.businesscentral.dynamics.com/v2.0/production/api/v2.0/$metadata#companies({id})/dimensions({id})/dimensionValues
Unfortunately, this endpoint returns only a small subset of Departments values; comparing them with the list shared by the customer it appears that only 23 out of 168 are returned by Dynamics API.
After more digging, we found out that by querying the full list of dimension values, without specifying the dimension ID of the Department, we get the full list!
GET https://api.businesscentral.dynamics.com/v2.0/production/api/v2.0/$metadata#companies({id})/dimensionValues
However, all the departments that are missing from the previous call have one thing in common, the dimension_id
field appears as "00000000-0000-0000-0000-000000000000".
Missing from GET ../companies({id})/dimensions({id})/dimensionValues
{
"@odata.etag": "W/\"JzIwOzE1MzQwNjUxMTc5NTE3NTExMDE0MTswMDsn\"",
"id": "8d1ba80f-7ba5-ec11-80f1-000d3a870012",
"code": "01C",
"dimensionId": "00000000-0000-0000-0000-000000000000",
"displayName": "XXXXX",
"consolidationCode": "01C",
"lastModifiedDateTime": "2023-08-27T20:28:55.48Z"
}
Available from ../companies({id})/dimensions({id})/dimensionValues
{
"@odata.etag": "W/\"JzE5OzQ2NzAwNDA2MjgwNzA1OTI0MzgxOzAwOyc=\"",
"id": "e8b99a37-3cb1-ee11-a56a-002248436b28",
"code": "03D",
"dimensionId": "e1c652f0-7aa5-ec11-80f1-000d3a870012",
"displayName": "YYYYY",
"consolidationCode": "",
"lastModifiedDateTime": "2024-01-15T09:38:16.86Z"
}
Therefore, it appears that the issue resides on Dynamics, without the dimensionId
field populated accordingly we’re not able to retrieve the full list of values for a specific dimension via GET ../companies({id})/dimensions({id})/dimensionValues API.
Also, we can't use the GET ../companies({id})/dimensions({id})/dimensionValues API as we would not be able to identify to which dimension a value belongs to in case the dimension_id
field appears as "00000000-0000-0000-0000-000000000000".
Looking around, we found out that this issue might be related to a recent Dynamics upgrade where some data migrations were not completed successfully, please see here to find out more.
Thanks
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156