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

SalesOrder add issue for Shipto address and Billto address in Dynamics 365 BC oDataV4 API ?

(7) ShareShare
ReportReport
Posted on by 989

Hi Expert ,

      I want to add Sales Order using oData api V4. I am able to add order without shipto and Bill to address .SalesOrder-Add-Error-Details-.txt .I have used below url for order add .

         api.businesscentral.dynamics.com/.../SalesOrder

      Please suggest what will be the exact format to add SalesOrder with Ship-To Address and Bill-To Address. I have attached my two txt file one for SalesOrder format which is added successfully and another one is different type of SalesOrder format from which i am getting different type of error . Please checked the attached file .

    SalesOrder-Add-Error-Details-.txtSalesOrder-Add-realated-data-.txt

Thanks & Regards 

Surajit Kundu

      

I have the same question (1)
  • BCgs Profile Picture
    470 on at

    We’re having a similar issue, our API won't let us set a shipping address. There is an option to change the shipping address option (like the dropdown on BC). Here's what it says if I set it to something different to what it should be:

    not an option. The existing options are: Default (Sell-to Address),Alternate Shipping Address,Custom Address

    But when set to Custom Address, it still won't let us use a custom address!

    Property \"Editable\" for Ship-to Name is invalid. Expression: [p42ShipToOptions = p42ShipToOptions::\"Custom Address\"]

    Anyone else experiencing this?

  • Suggested answer
    Olister Rumao Profile Picture
    4,009 on at

    Hi All,

    This is because of you take a look at the standard Sales Order Functionality then you will find that if the address is set to Default then your Address becomes Customer Master Address, If you use Alternate Shipping Address then it will ask you for the Alternate Shipping address code and only when you select Custom Address, your Sell to Address fields will be visible.

    A simple workaround would be create a list of custom fields in Sales Header table with extensions and fill the custom fields with the address that you want whenever your Shipping Address Options are selected and then integrate it in your Custom API by copying the existing SalesOrderAPI and adding the new fields in it.

    I would highly recommend taking a look that the API code as it shall give you more clearity.

    Hope this helps.

    Let me know if you need more with this.

  • eliotcole Profile Picture
    35 on at
    I would assume that one sends an update to the salesOrder after first submitting it, but I'm trying to figure this all out myself, as (other than Yun Zhu) BC devs are generally a walled garden of knowledge! :sweat_smile: !!!
  • Suggested answer
    Chavda Dharmendra Profile Picture
    1,004 Super User 2026 Season 1 on at
     
    I tested all the requests you shared and everything is working now.
     
    Request 1:
    I created a custom Sales Order Card page extension and added the code:
     field(ShipToOptionsnew; ShipToOptions)
                {
                    ApplicationArea = All;
                }
     
    Just by changing ShippingOptions to ShipToOptionsnew, it worked.
     
    Request 2: Make sure to add
    "ShippingOptions": "Custom Address"  before "Ship_to_Name":"TEST Insync".
     
    Request 3: 
    "ShipToOptions":"Custom Address" is not the correct value. You need to use:
    "ShippingOptions": "Custom Address"
     
    I’ve updated all the request & response in the attached file for you to check.
     
    Thank you
    Dharmendra Chavda

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,711 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 998 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 635 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans