DownloadPurchaseOrderSummary
Downloads the order summary PDF for a purchase order.
Procedure Specific Information
Downloads the order summary PDF for a purchase order. The PurchaseOrderId parameter is required. The file can be saved to a local path via DownloadLocation, written to a stream via FileStream, or returned as base64-encoded data in the FileData output column. The procedure is executed as below:
EXEC DownloadPurchaseOrderSummary PurchaseOrderId = 'po-123', DownloadLocation = 'C:/temp/summary.pdf'
EXEC DownloadPurchaseOrderSummary PurchaseOrderId = 'po-123'
You can also supply an instance of an output stream in the FileStream parameter.
When neither DownloadLocation nor FileStream is supplied, the downloaded file is returned in the FileData output column as a base64-encoded string.
Input
| Name | Type | Accepts Output Streams | Description |
| PurchaseOrderId | String | False | The Id of the purchase order. |
| DownloadLocation | String | False | The local full file path to save the PDF. |
| FileStream | String | True | An instance of an output stream where PDF data is written to. Only used if DownloadLocation is not set. |
Result Set Columns
| Name | Type | Description |
| FileData | String | The base64-encoded PDF data. Only populated if DownloadLocation and FileStream are not set. |
| Status | String | The status of the operation. |