Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Dimension API missing values

Posted on by 6
Hi, we are building an integration for sales and purchase orders via API 2.0. Customer has configured dimensions for cost center, department, and others.
 
We can obtain the dimensions with no problem using API: https:/api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0/dimensions?company=XXX
 
We can also get all the values for every dimension calling the Dimension Values API: https:/api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0/dimensionValues?company=XXX
 
However, most of the returned dimension values have an empty GUID as dimensionId, like this:
 
    {      /@odata.etag/: /W////JzIwOzEzNTIwMzczMTc4NTMxMDcyMzc2MTswMDsn////,      /id/: /454805ba-9a58-ee11-8df1-00224835c63a/,      /code/: /1/,      /dimensionId/: /00000000-0000-0000-0000-000000000000/,      /displayName/: /Camanchaca/,      /consolidationCode/: //,      /lastModifiedDateTime/: /2023-09-21T16:20:12.467Z/    },
 
 
Customer swears they can see the dimensions fine in BC. We can use them when creating sales orders and purchase orders, it's just that we can't obtain all dimension values from the API if we try to filter dimensions.
 
Any hints? Thanks in advance.
Ivan
 
  • Suggested answer
    Dimension API missing values
    You are most likely missing upgrade. To mitigate the issue go to the API Data Upgrade page.
    Select first the Default Dimensions, then Dimension Values and invoke Reset. Invoke the Schedule upgrades. This should fix the data. The status on the API Data Upgrade page should change to completed for both entries. 

    You can repeat the steps for all entities, it may take time. 

    The steps need to be done per company that is affected. 
  • Suggested answer
    dylan_ramp Profile Picture
    dylan_ramp 9 on at
    Dimension API missing values
    We recently ran into the same issue while building an integration, and I thought I would share some insight since it was also frustrating for us. It turns out that the dimensionId field of dimension values was added relatively recently. This field was populated for all existing dimension values via an "API Data Migration". Apparently, some users skip these data migrations to minimize downtime during upgrades, so it's essentially expected behavior that this field may be null. Our solution was to replicate the dimensionValues API page in our extension and add the dimensionCode field. You can then filter on dimensionCode and this field will always be populated.
  • DM-22051448-0 Profile Picture
    DM-22051448-0 4 on at
    Dimension API missing values
    Hello,
     
    I'm encountering the same problem within our setup. Could someone propose a solution for this?

  • itoledo Profile Picture
    itoledo 6 on at
    Dimension API missing values
    Hi Zhu:
     
    Thanks for your help. I tried many combinations but it seems that there's a problem with the data. Unfortunately, the customer already has rolled out to production so they won't change/reimport anything right now until "the dust settles".
     
    I've a couple of questions though. There seems to be another API (the "Finance Reports API") that supposedly shows the correct information: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/api-overview
    Customer is using PowerBI to connect to those reports and they sent me the correct dimension values. Unfortunately I haven't been able to find any documentation/examples on how to query that API, do you know any?
     
    Best regards
    Ivan
     
  • YUN ZHU Profile Picture
    YUN ZHU 68,395 Super User 2024 Season 2 on at
    Dimension API missing values
    Hi, I tested it and didn't encounter your problem. It is recommended that you export all records in Dimension Value (349) in the configuration package and check again.
     
    Test Endpoint: https://api.businesscentral.dynamics.com/v2.0/c8558e71-6ad8-4fcd-9f29-3ca165b41bbe/Sandbox223/api/v2.0/companies(554f4f15-9c8e-ee11-be3e-6045bde96b9a)/dimensions(14be2193-90ab-ee11-a56a-6045bd686202)/dimensionValues
     
    Thanks
    ZHU
     

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,252 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,089 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans