ObjectId does not exist until the save operation completes.
ParseObject gameScore = new ParseObject("My Parse File");
To get the identifier of an object, you need to save the object and register it for a save callback.
gameScore.saveInBackground(new SaveCallback <ParseObject>() { public void done(ParseException e) { if (e == null) {
ObjectId can be retrieved from the original ParseObject (gameScore) after running the completed callback.
Tarun
source share