GetShipmentList returns blank fields

Hello,

I’m trying to pull data through ShipmentList.GetShipmentList(Date, Date) but these fields aren’t returning any data:

  • TotalWeight
  • FromLocationNumber
  • ToLocationNumber

Additionally, I want pull these fields which I can’t find in the ShipmentListItem:

  • Total Pieces
  • Request Number

How can this be acheived?

Hi, jonathon.noujaim.

One way to do it is like in the sample below modifying the parameters as needed. A Request however is unrelated to a Shipment in Quantify. Let us know if you have any furthers questions.

 var companyTradingPartnerID = TradingPartner.GetTradingPartner("Root Node or Company Name").TradingPartnerID;

var shipmentList = ShipmentList.GetShipmentListForRegion(companyTradingPartnerID, 
                true, ShipmentStatusType.ShowAll, false, 12, true);

foreach (var shipment in shipmentList)
{
        var shipmentProductList = ShipmentProductList.GetShipmentProductList(shipment.ShipmentID, shipment.ShipmentStatus);

        Console.WriteLine(shipment.ShipmentNumber);
        Console.WriteLine(shipment.FromLocationNumber);
        Console.WriteLine(shipment.ToLocationNumber);
        Console.WriteLine(shipmentProductList.TotalWeight);
        Console.WriteLine(shipmentProductList.TotalPieces);
        Console.WriteLine();
}

Thanks for posting.

I got it now. Your solution worked.

Thanks Dev