Share via


GetPurchaseOrdersAsXml Method

Returns the XML for the OrderGroupCollection populated with PurchaseOrder objects with specified identifiers.

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

Syntax

'Declaration
Public Function GetPurchaseOrdersAsXml ( _
    orderGroupIds As Guid() _
) As XmlElement
'Usage
Dim instance As PurchaseOrderManager
Dim orderGroupIds As Guid()
Dim returnValue As XmlElement

returnValue = instance.GetPurchaseOrdersAsXml(orderGroupIds)
public XmlElement GetPurchaseOrdersAsXml(
    Guid[] orderGroupIds
)
public:
XmlElement^ GetPurchaseOrdersAsXml(
    array<Guid>^ orderGroupIds
)
public function GetPurchaseOrdersAsXml(
    orderGroupIds : Guid[]
) : XmlElement

Parameters

  • orderGroupIds
    Type: array<System..::.Guid>[]()[]
    The List of order group identifiers.

Return Value

Type: System.Xml..::.XmlElement
XML for the OrderGroupCollection populated with PurchaseOrders with specified identifiers.

Exceptions

Exception Condition
UnsupportedTypeException

A strongly typed property or a weakly typed property with an unsupported type is found,

NotAuthorizedException

User does not have permission to perform this operation.

TimeoutException

Thrown if an SQL command timeout occurs.

Remarks

Returns the XML for the OrderGroupCollection populated with PurchaseOrder objects with specified identifiers.

You can define a custom class and then add an instance of the custom class to a PurchaseOrder object by using a weakly-typed indexer property. Commerce Server can store and retrieve these custom objects. However, the XML that the GetPurchaseOrdersAsXml method returns does not include the serialized representation of these custom objects.

If the user calls the GetPurchaseOrdersAsXml method without permissions to view payment information, the NotAuthorizedException is thrown. The Order system requires the user to have the OrdersViewer permission set to properly use this method and have the PurchaseOrder collection returned as XML.

In order to perform a GetPurchaseOrdersAsXml, 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