Update Method (SO)
- Last UpdatedNov 06, 2025
- 3 minute read
The Update() method updates all columns of the specified sales order record in the SO table.
The sales order is uniquely identified by the combination of the customer ID and purchase order ID in the sales order record.
'Declaration
Public Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal custId As String, _
ByVal poId As String, _
ByVal dateReceivedLocal As Date, _
ByVal purchaserId As DBInt, _
ByVal shipFrom As DBInt, _
ByVal soId As DBString, _
ByVal stateCode As SalesOrderState, _
ByVal notes As DBString, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef modId As String _
)
'Usage
Dim sessionId As Integer
Dim custId As String
Dim poId As String
Dim dateReceivedLocal As Date
Dim purchaserId As DBInt
Dim shipFrom As DBInt
Dim soId As DBString
Dim stateCode As SalesOrderState
Dim notes As DBString
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim modId As String
SO.Update(sessionId, custId, poId, dateReceivedLocal, purchaserId, shipFrom, soId, stateCode, notes, spare1, spare2, spare3, spare4, lastEditComment, modId)
public static void Update(
int sessionId,
string custId,
string poId,
DateTime dateReceivedLocal,
DBInt purchaserId,
DBInt shipFrom,
DBString soId,
SalesOrderState stateCode,
DBString notes,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
ref string modId
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- custId
- Required. Holds the customer ID.
- poId
- Required. Holds the ID of the customer's purchase order.
- dateReceivedLocal
- Required. 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
- Required. Holds the contact ID of the purchaser. This parameter can be used with the custId parameter to find the contact information in the Cust_Contact table.
- shipFrom
- Required. Holds the ID of the entity from which the sales order is expected to ship.
- soId
- Required. Holds the ID of the internal sales order, if any.
- stateCode
Required. Holds a SalesOrderState enumeration value that indicates the state of the sales order:
0=Open (the default)
1=Partially Complete
2=Closed
- notes
- Required. Holds notes about the sales order.
- spare1
- Required. Holds the contents of the user-defined spare1 field.
- spare2
- Required. Holds the contents of the user-defined spare2 field.
- spare3
- Required. Holds the contents of the user-defined spare3 field.
- spare4
- Required. Holds the contents of the user-defined spare4 field.
- lastEditComment
- Required. Holds comments that describe why this record is being added.
- modId
Required. Holds the modification ID assigned the last time this record was added or updated, for optimistic concurrency control. The passed value must match the modId value in the record for the update to succeed.
Output. Holds the new modification ID to identify this update of this record.