ABRA Flexi supports partial record updates (value changes). When updating records, include only the attributes you want to change. If you provide an empty attribute, its value will be deleted.
<?xml version="1.0"?><winstrom version="1.0"> <cenik id="123"> <nazevA>Nový název</nazevA> <!-- změněná hodnota --> <ean/> <!-- smazaná hodnota --> </cenik></winstrom>
Deleting Items
Most records can contain items (e.g., an invoice). These items can be added and deleted. If an item does not have an identifier specified, its position is used as the key reference. We recommend providing an external identifier for items as well, because additional information may be linked to an item (e.g., from which warehouse goods were issued). If items are managed by position only and a new record is inserted at the beginning, the values will be overwritten, but any linked information will remain associated with the original records. This approach is therefore not suitable for updates.
Updating All Items
If no identifier is specified when updating items, records will always be added. If you want to replace the list of records and delete all items that are not included in the update, use the attribute removeAll="true":
<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana id="123">
<polozkyFaktury removeAll="true">
<faktura-vydana-polozka>
<id>14</id> ⋮
</faktura-vydana-polozka>
</polozkyFaktury>
</faktura-vydana>
</winstrom>
In this case, all items that are not included in the list will be deleted. Items that are included will be updated or created.
The same request rewritten in JSON format would look like this:
{ "winstrom":
{
"@version": "1.0",
"faktura-vydana": [
{
"id": "123",
"polozkyFaktury@removeAll": "true",
"polozkyFaktury": [{
"id": "14",
⋮
}]
}]
}
}To directly delete selected items, you can use the attribute action="delete" — see Performing Actions.
Internal dependencies may exist between items, so during an update, an item that is not explicitly modified may still be changed. See internal dependencies when saving for more details.
The updating of labels works on a similar principle to updating items.
