Skip to Content

Set item.ShipFromItemLocation on Sales order when Auto-determination is not used

Feb 07 at 03:43 PM


avatar image
Former Member

It appears that I can not set the item.ShipFromItemLocation on a Sales order if Auto-determination is not used.

My Goal is to use a Custom set of rules to determine the Source of Supply. However there does not seem to be a way to set the item.ShipFromItemLocation See Code Below

///root= Sales order
foreach(var item in root.Item) {
 if (!item.ShipFromItemLocation.IsSet()) { // DOES NOT EXIST	
  item.FulfilmentPartyCategoryCode.content = "1"; // Internal
  var IL = item.ShipFromItemLocation.Create(); //CREATE NODE  ALWAYS RETURNS NULL
  if (IL.IsSet()) { // ALWAYS NOT SET
   IL.LocationID = "3"; //WILL NEVER GET HERE
 } else {
  item.ShipFromItemLocation.LocationID = "3"; //CAN SET IT HERE IF ALREADY DEFAULTED
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers