I am trying to write some Cloud Code for Parse that upon creation of a new _User, it will copy that user's objectId, append it, and then put the resulting value in a new column called SubscriptionObject. The code I have tried is:
Parse.Cloud.afterSave(Parse.User, function(request, response) {
Parse.Cloud.useMasterKey(MYMASTERKEY);
var theObject = Parse.User.current().id
var newObject = 'User_' + theObject;
request.object.set("SubscriptionObject", newObject);
response.success();
});
However, the SubscriptionObject key never gets set.