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...
Suggested answer

Posting shortcutDimension1Code via API v2 to purchaseOrder header

(0) ShareShare
ReportReport
Posted on by
Hello,
 
I'm rather new to BC developent and I try to connect an application via API v2 to BC. The application creates a puchase order which generally works fine. What does not work is to post  the codes for shortcutDimension1Code and shortcutDimension2Code.
 
I prototype with Postman.
The JSON I use to post is as follows:
 
{
   /orderDate/: /2024-5-16/,
   /vendorNumber/: /600354/,
   /shortcutDimension1Code/: /some value/,
   /shortcutDimension2Code/: /another value/
}
 
Status response is 201.
 
The body of the response is:
 
{
    /@odata.context/: ...
    
    /number/: /BE02-000035/,
    /orderDate/: /2024-05-16/,
    /postingDate/: /2024-05-16/,
    /vendorId/: /8d3fc854-e338-ed11-97e8-0022485d2640/,
    /vendorNumber/: /600354/,
...
    /shortcutDimension1Code/: //,
    /shortcutDimension2Code/: //,
...
}
 
In BC the dimensions are empty.
 
Does anyone know how to post dimension values to BC using the API?
 
Thanks and kind regards,
Thomas
 
  • Aaron Bauldree Profile Picture
    19 on at
    Posting shortcutDimension1Code via API v2 to purchaseOrder header
    Do you have Global Dimensions set up? If so (especially when declaring Shortcut Dimension 1), the Global Dimension 1 "overrides" the Shortcut Dimension 1, so this could be causing your issue.
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,320 Super User 2025 Season 1 on at
    Posting shortcutDimension1Code via API v2 to purchaseOrder header
    Hi,
     
    You can pass dimension the API allows you to enter shortcutDimension1Code & shortcutDimension2Code. These fields are available in standard API V2. 
     
    If you would like to insert additional dimensions other than 1 and 2 then you can use part - dimensionSetLines.
     
    To use parts in API you can use $expand. If you don't know then refer this video https://youtu.be/i0luLg2vfgk
     
    Regards,
    Saurav Dhyani
  • Gerardo Rentería García Profile Picture
    20,775 Most Valuable Professional on at
    Posting shortcutDimension1Code via API v2 to purchaseOrder header

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans