LPS-50822 get entries before deleting
LPS-50822 add test
LPS-50822 SF