Remove all element from an entities and save

Hi Cuba Team !
I try to remove All elements of an entities before create new element
I using CollectionContainer but getItems() return Null
Capture

this’s my code

     for (Custom custom: customsDc.getItems()){
                dataContext.remove(custom);
            }
    customsDc.getMutableItems().clear();

I don’t know why? Please help!

Hi,
can you post a little more code?
May be you try to remove the items before dataLoader has loaded the collection
(i.e. in the onLoad-event of the mask-controller ).

Regards,
Martin

1 Like

you are right!, I tried to delete it too soon :sweat_smile: