GetByFilter(String) Method
- Last UpdatedNov 06, 2025
- 2 minute read
The GetByFilter() method retrieves a filtered set of customers and their sales orders.
For this overload of the method, the filter is based on the sales order state settings saved for a user to the UI_Config table. Thus, a user ID is required to identify which sales orders to retrieve.
The settings in the UI_Config table are:
- Complete sales orders: All required quantities of all items in the sales order have been recorded as shipped.
- Partial sales orders: Some item quantities but not all required quantities of all items in the sales order have been recorded as shipped.
- Open sales orders: No item quantities have been recorded as shipped.
One or more of the filter settings, or none, can be set. If none of the filter settings are set, then records for all customers are returned, regardless of whether customers have sales orders or not.
Parameters
- userId
- Required. Holds the user ID of the MES user for whom the customer filter of sales order states was saved.
Return Value
Returns a DataSet of customers and purchase orders, from columns in the Cust and SO tables. The DataSet records are only for customers (that is, for those records in the Cust table for which the customer flag is true, regardless of the vendor flag setting) and for the sales order states that match those defined by the customer filter that was saved in the UI_Config table for the specified MES user. If no matching sales order states are found for any customers, an empty DataSet is returned.
The columns of the returned DataSet are described below.
|
Column Names |
Description |
|---|---|
|
cust_id |
A string that is the customer ID, from the Cust table. |
|
cust_name |
A string that is the name of the customer, from the Cust table. |
|
po_id |
A string that is the customer's purchase order ID, from the SO table. |
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.