Share via


How to Search for Purchase Orders

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

You can search the orders database to find all purchase orders that meet certain conditions. You might search the orders database to send purchase orders to an order fulfillment system or to mine the data for trends.

To search for purchase orders

  1. Create an OrderManagementContext object.

    For more information about creating an OrderManagementContext object, see How to Create an OrderManagementContext Object.

  2. Get the PurchaseOrderManager object from the OrderManagementContext object.

  3. Create a SearchClause object.

    For more information about creating a SearchClause object, see How to Create a Search Clause.

  4. Optionally, to specify how to return results, create a SearchOptions object.

    For more information about creating a SearchOptions object, see How to Specify Search Options.

  5. Call the SearchPurchaseOrders method on the PurchaseOrderManager object and pass the SearchClause object and, optionally, a SearchOptions object as parameters.

  6. Enumerate the results of the search.

    For more information about enumerating the results of a search, see How to Enumerate Search Results.

    For a complete example that illustrates how to search for baskets, see Sample Purchase Order Search Implementation.

See Also

Other Resources

Sample Purchase Order Search Implementation

Searching the Orders Database