Cannot delete record from Parse server

I'm working on developing an iOS social networking application. In the app, I create a controller for current user to send add-friend request and another user to receive the request.

The request has already been sent and received by another user, and the record is showing on the dashboard of Parse.com. Right now I have created a button for current user to delete this request.

The information of a user who receives this request is stored in

PFUser *anotherUser
.

This is the code for deleting the request:

PFQuery *query = [PFQuery queryWithClassName:@"FriendClass"]; 

[query whereKey:@"type" equalTo:@"friendRequest"]; 
[query whereKey:@"fromUser" equalTo:[PFUser currentUser]]; 
[query whereKey:@"toUser" equalTo:anotherUser]; 
[query findObjectsInBackgroundWithBlock:^(NSArray *requestActivities, NSError *error) { 
     if (!error) { 
          for (PFObject *requestActivity in requestActivities) { 
              [requestActivity deleteEventually]; 
          } 
     } 
}];

However, The delete event cannot be completed. I tried to debug and go through each line of it, and it seemed that there are no objects found with the query. The database indeed has the record of this request.

I actually used the same code by calling it from other controllers, and those controllers are working well. I have no clue about it.

I appreciate any answer to this question and am learning from it. Thank you so much!

There is the original link of the question in Stack Overflow:

https://stackoverflow.com/questions/49178069/cannot-find-the-record-of-parse-having-no-clue-about-it