Suppliers
Write
pixiDispoClearSOrderlinesOnNEW
Deletes all lines and then the empty supplier orders with status NEW that were created by the given user.
Cleans up supplier orders (disposition) that are still in status NEW (StatusId = 1) for one creating user.
- Reads the setting
LogControl_DoNotDeleteOrderlinesOnNew. If it is1, the call does nothing. - Resolves
@CreateEmpto a user ID usinginf.UserGetByName. No fallback user is used. - Deletes all rows in
pixi.SupplierOrderLinethat belong to supplier orders withStatusId = 1andRecordCreatedByUserIdequal to that user ID. - Deletes the supplier orders with
StatusId = 1, created by that user, that no longer have any order lines.
Only orders created by the given user are affected. Orders of other users and orders in any other status stay unchanged. The call returns no result set.
Notes
- If
@CreateEmpdoes not exist inUCS_USERS, the user ID isNULLand nothing is deleted. The call gives no feedback in this case. - If the setting
LogControl_DoNotDeleteOrderlinesOnNewdoes not exist, it counts as0, so the deletion runs. - Both
DELETEstatements run without an explicit transaction. The subqueries read withNOLOCK. - The orders are deleted with a
NOT INcheck against allSupplierOrderIdvalues ofpixi.SupplierOrderLine. If any line has aNULLSupplierOrderId, no order is deleted. - An earlier deletion of history rows (
SOrderlinesHist) is commented out and does not run. - The deletion is permanent. The call returns no rows and no row counts.
Tables used
SupplierOrderLine · Write
supplierOrder · Write
Settings · Read
UCS_USERS · Read
| Parameter | Type | Default | Description |
|---|---|---|---|
CreateEmp
|
varchar(50) string |
API |
User name (from Example: |
This call returns no result set.
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiDispoClearSOrderlinesOnNEW>
<!-- <CreateEmp>API</CreateEmp> -->
</ns1:pixiDispoClearSOrderlinesOnNEW>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiDispoClearSOrderlinesOnNEW>
<!-- <CreateEmp>API</CreateEmp> -->
</ns1:pixiDispoClearSOrderlinesOnNEW>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'CreateEmp' => 'API',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiDispoClearSOrderlinesOnNEW', $soapArguments);
- SQL object:
- dbo.pipiDispoClearSOrderlinesOnNEW
Updated at 2026-10-30