@aeroengineerz7 Hey Juan !
I think you are doing wrong, this line →
wixData.remove("ReviewsPermission", reviewsId)
It should be like this →
wixData.remove("ReviewsPermission", ownerId)
Because after the query, you are assigning the result as ownerId on this line →
.then((result) => {
let ownerId = result.items[0]._owner;
So when you remove that row that should be →
wixData.remove("ReviewsPermission", ownerId)
Ajith