Jaa


UpdatePurchaseOrder Method

Updates the PurchaseOrder object.

Namespace:  Microsoft.CommerceServer.Orders
Assembly:  Microsoft.CommerceServer.Orders.CrossTierTypes (in Microsoft.CommerceServer.Orders.CrossTierTypes.dll)

Syntax

'Declaration
Public Sub UpdatePurchaseOrder ( _
    purchaseOrderDataSet As DataSet, _
    applicationId As String _
)
'Usage
Dim instance As PurchaseOrderManager
Dim purchaseOrderDataSet As DataSet
Dim applicationId As String

instance.UpdatePurchaseOrder(purchaseOrderDataSet, _
    applicationId)
public void UpdatePurchaseOrder(
    DataSet purchaseOrderDataSet,
    string applicationId
)
public:
void UpdatePurchaseOrder(
    DataSet^ purchaseOrderDataSet, 
    String^ applicationId
)
public function UpdatePurchaseOrder(
    purchaseOrderDataSet : DataSet, 
    applicationId : String
)

Parameters

  • applicationId
    Type: System..::.String
    Identifier for the caller application as defined in the StatusManager table in transactionconfig database.

Exceptions

Exception Condition
MalformedDataSetException

The specified dataset is malformed.

OrderNotSavedException

The exception that is thrown when PurchaseOrder is not persisted to the Storage.

NotAuthorizedException

User does not have permission to perform this operation.

TimeoutException

Thrown if an SQL command timeout occurs.

Remarks

Updates the purchase order. The purchase order object with the same order group identifier is loaded from the database. If no purchase orders are found, a RecordNotFoundException is thrown because new purchase orders cannot be created through the Web service.

The specified dataset is converted into a purchase order object. During the conversion, any collections for which the user does not have permission will be replaced with the collection members from the instance of the purchase order loaded from the database.

The DataSet is saved back to the database.

An application that calls the UpdatePurchaseOrder method must run under an account that has the OrdersViewer role. If the application updates payments, the account the application runs under must also have permission to perform the ViewPurchaseOrderPayments task and the WritePaymentMethods task.

In order to perform a UpdatePurchaseOrder, the user must have the OrdersViewer permissions. See Orders System Roles [CS06] for more information about the specific roles in the Order System.

Some order system APIs support distributed transactions. If a cookie with a valid transaction is found the order system enlists as part of that transaction. If a valid transaction is not found the order system initiates a new transaction.

Permissions

See Also

Reference

PurchaseOrderManager Class

PurchaseOrderManager Members

Microsoft.CommerceServer.Orders Namespace