GetAll Method (SO)
- Last UpdatedNov 06, 2025
- 4 minute read
'Declaration
Public Shared Function GetAll( _
ByVal custId As String, _
ByVal poId As String, _
ByVal dateReceivedUtc As Nullable(Of Date), _
ByVal dateReceivedLocal As Nullable(Of Date), _
ByVal purchaserId As Nullable(Of Integer), _
ByVal shipFrom As Nullable(Of Integer), _
ByVal soId As String, _
ByVal stateCode As Nullable(Of SalesOrderState), _
ByVal notes As String, _
ByVal spare1 As String, _
ByVal spare2 As String, _
ByVal spare3 As String, _
ByVal spare4 As String, _
ByVal lastEditBy As String, _
ByVal lastEditAt As Nullable(Of Date) _
) As DataSet
'Usage
Dim custId As String
Dim poId As String
Dim dateReceivedUtc As Nullable(Of Date)
Dim dateReceivedLocal As Nullable(Of Date)
Dim purchaserId As Nullable(Of Integer)
Dim shipFrom As Nullable(Of Integer)
Dim soId As String
Dim stateCode As Nullable(Of SalesOrderState)
Dim notes As String
Dim spare1 As String
Dim spare2 As String
Dim spare3 As String
Dim spare4 As String
Dim lastEditBy As String
Dim lastEditAt As Nullable(Of Date)
Dim value As DataSet
value = SO.GetAll(custId, poId, dateReceivedUtc, dateReceivedLocal, purchaserId, shipFrom, soId, stateCode, notes, spare1, spare2, spare3, spare4, lastEditBy, lastEditAt)
public static DataSet GetAll(
string custId,
string poId,
Nullable<DateTime> dateReceivedUtc,
Nullable<DateTime> dateReceivedLocal,
Nullable<int> purchaserId,
Nullable<int> shipFrom,
string soId,
Nullable<SalesOrderState> stateCode,
string notes,
string spare1,
string spare2,
string spare3,
string spare4,
string lastEditBy,
Nullable<DateTime> lastEditAt
)
Parameters
- custId
- Optional filter parameter. Holds a customer ID.
- poId
- Optional filter parameter. Holds the ID of a purchase order.
- dateReceivedUtc
- Optional filter parameter. Holds the date when a sales order was received, in UTC.
- dateReceivedLocal
- Optional filter parameter. Holds the date that the sales order was received in the local time of the entity specified by the shipFrom parameter, if supplied. If a ship-from entity is not specified, the default time zone will be used to determine the local time.
- purchaserId
- Optional filter parameter. Holds the contact ID of a purchaser.
- shipFrom
- Optional filter parameter. Holds the ID of an entity from which a sales order shipped.
- soId
- Optional filter parameter. Holds the ID of an internal sales order.
- stateCode
Optional filter parameter. Holds the state of a sales order.
0=Open (the default)
1=Partially Complete
2=Closed
- notes
- Optional filter parameter. Holds notes about a sales order.
- spare1
- Optional filter parameter. Holds the contents of the user-defined spare1 field.
- spare2
- Optional filter parameter. Holds the contents of the user-defined spare2 field.
- spare3
- Optional filter parameter. Holds the contents of the user-defined spare3 field.
- spare4
- Optional filter parameter. Holds the contents of the user-defined spare4 field.
- lastEditBy
- Optional filter parameter. Holds the user who created or last updated the record.
- lastEditAt
- Optional filter parameter. Holds the date and time that the record was added or last updated.
Return Value
Returns a DataSet that contains records for all the sales orders that satisfy the specified filters. The returned records include columns from the SO and Cust tables. If no matching sales orders are found, 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 SO table. |
|
po_id |
A string that is the customer's purchase order ID, from the SO table. |
|
date_received_utc |
A datetime that is the UTC time when the sales order was received, from the SO table. |
|
date_received_local |
A datetime that is the time when the sales order was received in the local time of the entity specified by ship_from, if supplied. If a ship-from entity is not specified, the default time zone will be used to determine the local time. |
|
purchaser_id |
An integer that is the ID of the purchaser in the Cust_Contact table, from the SO table. |
|
ship_from |
An integer that is the ID of the entity from which the order is expected to ship, from the SO table. |
|
so_id |
A string that is the internal sales order, from the SO table. |
|
state_cd |
An integer that indicates the state of the sales order, from the SO table: 0=Open 1=Partial Complete 2=Closed |
|
notes |
A string that is the notes for the sales order, from the SO table. |
|
spare1 to spare4 |
A string that is the content of the spare1 to spare4 values, from the SO table. |
|
cust_name |
A string that the name of the customer identified by cust_id, from the Cust table. |
|
last_edit_comment |
A string that contains comments about why the record was added or updated. |
|
last_edit_by |
A string that is the ID of the user who added or last updated this record. |
|
last_edit_at |
A datetime that indicates when the record was added or last updated. |
|
mod_id |
The current modification ID of the record in the table. This ID is binary number that increments each time the record’s table row is modified. Optionally used for optimistic concurrency control when performing updates or deletes. |