I have one Parse object in my user table and I added some data to it in one column. When I reference this data straight away it shows as undefined but when I retrieve the object through a query it shows the data. What is going on here?
console.log(Parse.User.current().get("contractorCode"))//this is undefined
var query = new Parse.Query(Parse.User);
query.get(Parse.User.current().id, {
success: function(test){
console.log("test", test.get("contractorCode"));//this returns the data
}
})
What is going on here and how do I get the data recognized in Parse without the extra query? It seems as if it needs to be in there a certain amount of time to refresh (which I actually pushed on both the browser and on the Parse dashboard set up). Is this so or am I missing something?