pixiPicklistDelete
Deletes a picklist with its items, picking progress, picklist boxes and transport bin assignments.
Deletes the picklist identified by PicklistNumber (PLHkey in PLHeader).
Steps:
- If
PicklistNumberis not passed, an error row is returned. - If no picklist with this number exists, an error row is returned.
- The number of entries in
PL_ItemPickingProgressfor the picklist is counted. If there are any andForceDelete = 0, the call stops with an error row, because items of the picklist are currently being picked. - Otherwise the internal procedure
Pixi_DeletePickListis executed. It deletes, in this order, the picking progress entries, the picklist boxes (PicklistBox), the transport bin assignments with document type 1 (TransportBinMatch), the picklist items (PLitem) and finally the picklist header (PLHeader). - A row with
Status = Successand a confirmation message is returned.
Exactly one row with Status and Message is returned in every case.
Notes
- The deletion runs inside a transaction in
Pixi_DeletePickList(or a savepoint if a transaction is already open). On an error it is rolled back and logged vialog.InsertError(not attached). - Pitfall:
Pixi_DeletePickListcatches its own errors and does not re-raise them. Therefore an error during the deletion is usually not seen by this call, and theSuccessrow may be returned even though the rollback left the picklist in place. Verify the deletion if in doubt. The messageUnexpected error. Picklist was not deleted.only appears for errors that escape the inner procedure. - Existence and picking-progress checks use
NOLOCK, so they can read uncommitted data. ForceDelete = 1also removes picklists that are being picked right now; pickers working on it lose their progress.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
PicklistNumber
|
int | NULL |
Number of the picklist to delete ( Example: |
ForceDelete
|
bit boolean |
0 |
Deletes the picklist even if items are currently being picked. Allowed values
Example: |
Result set 1 · Always (one row, success or error)
Status row of the call.
| Column | Type | Description |
|---|---|---|
Status
|
varchar(7) string |
|
Message
|
varchar(max) string |
Confirmation or error text. |
Response example
<SqlRowSet1>
<row>
<Status>Success</Status>
<Message>Picklist with picklist number "10452" was deleted.</Message>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| Error | "PicklistNumber" is a mandatory parameter. | `PicklistNumber` was not passed or is NULL. |
| Error | Picklist with picklist number "{PicklistNumber}" could not be found. | No picklist with this number exists in `PLHeader`. |
| Error | Picklist is currently in use and items are being picked. To delete the picklist that is currently in use, set parameter "ForceDelete = 1" | Picking progress entries exist for the picklist and `ForceDelete` is 0. Pass `ForceDelete = 1` to delete anyway. |
| Error | Unexpected error. Picklist was not deleted. | An error escaped from the internal delete procedure. |
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:pixiPicklistDelete>
<!-- <PicklistNumber>10452</PicklistNumber> -->
<!-- <ForceDelete>0</ForceDelete> -->
</ns1:pixiPicklistDelete>
</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:pixiPicklistDelete>
<!-- <PicklistNumber>10452</PicklistNumber> -->
<!-- <ForceDelete>0</ForceDelete> -->
</ns1:pixiPicklistDelete>
</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 = [
// 'PicklistNumber' => '10452',
// 'ForceDelete' => '0',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiPicklistDelete', $soapArguments);
- SQL object:
- dbo.pipiPicklistDelete