on ‎2020 Feb 28 5:28 AM
How to remove all the records from OrderEntry, Order,CartEntry,Cart using Impex and what is the best practice to delete all old records.
Request clarification before answering.
For this you can make use of the batchmode of Impex
REMOVE AbstractOrderEntry[batchmode=true];itemType(code)[unique=true]
;CartEntry;
;OrderEntry;
REMOVE Cart[batchmode=true];itemType(code)[unique=true]
;Cart
Important is here that you define something as unique for identification. With batchmode = true you specify that even if you find multiple Instances do the things for all of them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
I tried for removing the OrderEntry records but getting the below exception. I have checked below PK values in HMC and BackOffice but couldn't find any record.
REMOVE AbstractOrderEntry[batchmode=true];itemType(code)[unique=true]
,8806760120366,,,item 8806760153134 no longer valid (was removed): object no longer valid, item 8806760120366 not found;OrderEntry;
,8806760284206,,,item 8806760316974 no longer valid (was removed): object no longer valid;OrderEntry;
,,,,;OrderEntry;
The Media Objects were probably removed after the Impex Run was started and before the Object could be handled. Either someone else has deleted them during this time, another Automatic functionality in your hybris did it or something else has gone wrong (caching hybris/db, etc).
It also could be that the Objects had a part-of relation or were deleted with an RemoveInterceptor while deleting other Objects.
For Example if the Cart is deleted, the related CartEntry needs to be deleted as well. If one Thread is removing the Cart while the other Thread is removing the CartEntry this could lead to these Errors.
Please check if there are still Objects for the provided Types. If not then everything should be fine and you can ignore this error messages.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.