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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Item's UnitPrice are not assigned correctly when using OData Service or API to the create the sales Order

(0) ShareShare
ReportReport
Posted on by 140

Hi Experts,

We encounter one problem when using OData Service or API to the create the sales Order.

We find if we don't pass crossReferenceNumber for item in the request, the item's unit price is assigned as the price we passed in the request body.

But if we assign crossReferenceNumber for item in the request, the item's unit price is assigned as the price cacluclated by 365BC automatically?

Does anyone can shed me some lights on this issue?

We want assign the price for the item as we passed in the request body when we have crossReferenceNumber for the item.

Below is the sample request body we use to create sales order,now the price for the item is not created as 21.0 in the 365BC.

{
"ASNType": "Standard",
"documentType": "Order",
"sellToCustomerNumber": "10000",
"orderDate": "2020-10-06",
"TRCPONumber": "CrossRef-TW-2",
"number": "CMP1162",
"locationCode": "EAST",
"salesOrderLines": [
{
"documentType": "Order",
"type": "Item",
"quantity": 1,
"crossReferenceNumber": "667",
"number": "1896-S",
"lineNumber": 10000,
"unitPrice": 21.0
}
]
}

Thanks

  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

  • Denny1986 Profile Picture
    140 on at

    Thank you for your information, actually I already submitted the same question in yammar, but nobody reply me yet.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 741 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 514 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 336 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans