0
votes

I'm trying to update certain column value of my class matching the objectId of the class , Here is my code below

var GameScore = Parse.Object.extend("Address");
var query = new Parse.Query(GameScore);

query.equalTo("objectId", "xxxx");
query.first({
  success: function(object) {    
   alert(JSON.stringify(object));
    object.set("address","kkkkkk");
    object.save();
  },
  error: function(error) {
    alert("Error: " + error.code + " " + error.message);
  }
});

Now in the success function i get the row data for the given objectId, But the object.set and object.save alone not working , please advice what is gone wrong here.

I get "{"code":101,"error":"object not found for update"}" error in the reponse.

Thanks in advance :)

2
Could you check that client do have the permission to update the Class? - eth3lbert
@eth3lbert But i can able to update other Class Values , IS there permission for particular Class can be blocked ? - ManoharSingh
Oops sorry, you should check both class level permission and object level(ACL) permission. Every class and object have there own permission. - eth3lbert
@eth3lbert Thanks For the Info , Now Works Great :) - ManoharSingh
I'll just commit an answer for it. - eth3lbert

2 Answers

1
votes

Check both class level permission and object level(ACL) permission and make sure client have permission to update the object.

Also note that, All class and object have their own permission.

0
votes
var acl = new Parse.ACL();
acl.setPublicWriteAccess(true);
acl.setPublicReadAccess(true);
acl.setWriteAccess(user.id, true);
model.setACL(acl);

Is a problem with ACLs. With this you can solve it