Master Products Listing extraction

I am attempting to extract the Master Products for the top level organization. I have tried the below code without success. I get no errors, but nothing is returned. Can you please provide example? Thank you.

            If tp.Name <> str_Organization_Name Then

                Throw New Exception("Item not found")

            End If


            For Each item As StockedProduct In tp.StockedProducts





Hi James. The product catalog is a global list of parts without quantities. They’re referred to as just ‘Products’. Products with quantities are ‘StockedProducts’. The list of StockedProducts is limited to what’s stocked at a particular location. If you want to traverse the global product catalog you will use the ProductCollection. Code snippet below. Note that the fetch takes a product type. Regular products are just ProductType.Product, but you can fetch consumables, recurring charges (which have a base of product) and others.

    Dim prods As ProductCollection = ProductCollection.GetProductCollection(ProductType.Product)

    For Each prod As Product In prods
        Console.WriteLine(prod.PartNumber + " " + prod.Description)