web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Unable to set dimension via API

(1) ShareShare
ReportReport
Posted on by 2
Hi, I'm trying to create a sales invoice within Business Central via Power Automate and I'm having trouble setting a dimension on the invoice line.
 
I am successfully creating the sales invoice, then creating a line within the invoice.  Then, when I try to set a dimension on the line I've created, it gives the following error:  /You must get to the parent first to create a dimension set line/.
 
I've tried several different sets of parameters, but they all give the same error.  Here's my most recent try using the Create Record action:
 
The Parent Id is the ID of the invoice line and the Value Id is the ID of the dimension value.  I've also tried setting it using the Value Code and including the Code.  CREATE dimensionSetLines - Business Central | Microsoft Learn doesn't seem to give the example I need in Power Automate.
 
Can anyone guide me on what parameters I need to be specifying to get it to work?  Thanks
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,311 Super User 2025 Season 2 on at
    Hi, as far as I know, this is a problem that has always existed. I just tested it and it doesn't seem to be resolved.
     
    If you click Show raw inputs you can find that the parent type has no value, but this value is read-only. I think this is causing the problem.
     
    PS: There are no problems in PostMan.
     
    Additionally, if you insist on using Power Automate, consider the following method.
    Using OAuth 2.0 to connect Business Central APIs and Web Services in Power Automate – OAuth in HTTP action
     
    Hope this helps.
    Thanks.
    ZHU
  • Suggested answer
    YUN ZHU Profile Picture
    95,311 Super User 2025 Season 2 on at
    Update with a reply from my friend:
     
  • Verified answer
    ajkauffmann Profile Picture
    117 on at
    There is a difference between Power Automate and Postman. In Power Automate, the URL becomes this:
     
    POST /api/v2.0/dimensionSetLines
     
    while in Postman the URL is this:
     
    POST /api/v2.0/salesOrders(id)/dimensionSetLines
     
    With the URL in Postman, there is a filter applied to dimensionSetLines from the salesOrders API page. That's because dimensonSetLines is a subpage of salesOrder. The Business Central connector in Power Automate doesn't support this. Instead, it calls directly dimensionSetLines, without any filter. A filter can't be specified, if you try that, then the BC connector will simply fail.
     
    It's impossible to achieve this from Power Automate with the standard BC connector. Even a deep insert (lines + dimensions) is failing. The only option would be to create a custom API or use the standard HTTP connector.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,316

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,449 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,431 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans