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...
Answered

How to use code to control Ship to type in sales order of D365BC?

(0) ShareShare
ReportReport
Posted on by

Hi Expert,

How to change ship-to type using web service? I can't find a field in "Sales header" that represent this ship-to type:

pastedimage1573291620570v1.png

  • Verified answer
    Suresh Kulla Profile Picture
    50,280 Super User 2026 Season 1 on at

    There is no ship type field in the table, the value is determined on the page based on the value in Ship-to Code, Ship-to name and Ship-to Address, you can check the logic in the codeunit 1302, below is the snippet how it determines the value

    ShipToNameEqualsSellToName := ("Ship-to Name" = "Sell-to Customer Name") AND ("Ship-to Name 2" = "Sell-to Customer Name 2"); CASE TRUE OF ("Ship-to Code" = '') AND ShipToNameEqualsSellToName AND ShipToAddressEqualsSellToAddress: ShipToOptions := ShipToOptions::"Default (Sell-to Address)"; ("Ship-to Code" = '') AND (NOT ShipToNameEqualsSellToName OR NOT ShipToAddressEqualsSellToAddress): ShipToOptions := ShipToOptions::"Custom Address"; "Ship-to Code" <> '': ShipToOptions := ShipToOptions::"Alternate Shipping Address";

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

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 740 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 531 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 310 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans