UpdatePurchaseOrderProperties Method

Updates the properties for the purchase orders as specified in the XML.

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

Syntax

'Declaration
Public Sub UpdatePurchaseOrderProperties ( _
    element As XmlElement, _
    applicationId As String _
)
'Usage
Dim instance As PurchaseOrderManager
Dim element As XmlElement
Dim applicationId As String

instance.UpdatePurchaseOrderProperties(element, _
    applicationId)
public void UpdatePurchaseOrderProperties(
    XmlElement element,
    string applicationId
)
public:
void UpdatePurchaseOrderProperties(
    XmlElement^ element, 
    String^ applicationId
)
public function UpdatePurchaseOrderProperties(
    element : XmlElement, 
    applicationId : String
)

Parameters

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

Exceptions

Exception Condition
XmlException

The xml does not conform to specified schema.

OrderNotSavedException

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

ArgumentNullException

honorStatus is true and applicationId is nullNothingnullptra null reference (Nothing in Visual Basic). Or Specified element is nullNothingnullptra null reference (Nothing in Visual Basic)

NotAuthorizedException

User does not have permission to perform this operation.

TimeoutException

Thrown if an SQL command timeout occurs.

Remarks

UpdatePurchaseOrderProperties does not perform any validation on the property values. Hence, even if the Status property is not from the AllowedStatus table, no exception is thrown.

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

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.

The element paramater must use the following format.

<PurchaseOrderUpdates>
  <PurchaseOrder OrderGroupId="guid" PropertyName="string" PropertyValue="string" />
  <OrderForm OrderFormId="guid" PropertyName="string" PropertyValue="string" />
  <LineItem LineItemId="guid" PropertyName="string" PropertyValue="string" />
  <CreditCardPayment PaymentId="guid" PropertyName="string" PropertyValue="string" />
  <CashCardPayment PaymentId="guid" PropertyName="string" PropertyValue="string" />
  <GiftCertificatePayment PaymentId="guid" PropertyName="string" PropertyValue="string" />
  <PurchaseOrderPayment PaymentId="guid" PropertyName="string" PropertyValue="string" />
  <OrderAddress OrderGroupId="guid" OrderAddressId="guid" PropertyName="string PropertyValue="string" />
  <Shipment ShipmentId="guid" PropertyName="string" PropertyValue="string" />
  <ShippingDiscountRecord ShipmentId="guid" DiscountId="int" PropertyName="string" PropertyValue="string" />
  <DiscountApplicationRecord LineItemId="guid" DiscountId="int" PropertyName="string" PropertyValue="string" />
  <PromoCodeRecord OrderFormId="guid" PromoCode="string" PropertyName="string" PropertyValue="string" />
</PurchaseOrderUpdates>

Permissions

See Also

Reference

PurchaseOrderManager Class

PurchaseOrderManager Members

Microsoft.CommerceServer.Orders Namespace