Questions tagged [parse-cloud-code]

This code runs in the Parse Cloud rather than running on a mobile device. For complex apps, sometimes developers just need a bit of logic that isn't running on a mobile device. Cloud Code makes this possible.

The Parse Platform's vision is to let developers build any mobile app without dealing with servers. For complex apps, sometimes developers just need a bit of logic that isn't running on a mobile device. Cloud Code makes this possible.

Cloud Code is easy to use because it's built on the same JavaScript SDK that powers thousands of apps. The only difference is that this code runs in on a Parse Server rather than running on a mobile device. When developers update their Cloud Code, it becomes available to all mobile environments instantly. They don't have to wait for a new release of their application. This lets developers change app behavior on the fly and add new features faster.

1120 questions
2
votes
1 answer

Parse error with CLI while login to Parse (panic: runtime error: invalid memory address or nil pointer dereference)

Everything was working just fine few days ago. i don't remember what exactly i did to cause the problem. First of all, when i was trying to list out all the Parse apps for my current codebase with parse list, it asked me to login which i did.…
2
votes
2 answers

CloudCode promises in series, helper function gives error "Object has no method 'apply'"

I am new to JavaScript and I am trying to get my first bits of CloudCode working. I have created a helper function deleteFriendRequest as I will want this to be used by other functions. What I have written works but I get an error thrown. My…
2
votes
1 answer

SerializationException in Parse cloud code. mdhost.exe crashes

Setting up an nunit test project for some parse cloud code. Testing the hello world example cloud function I receive the following unhandled exception in Xamarin studio. (Test has passed a few times, but still receive…
brady321
  • 1,475
  • 13
  • 14
2
votes
1 answer

Query Inside Parse Cloud For Loop

I have been trying to run my Parse Cloud Code for some time and can not seem to get around this problem: I have an array of Parse objectId's called IDArray. I then am sending the array as a parameter of a PFCloud call. Once the array has been sent…
2
votes
1 answer

Pass a list to Parse.Promise.when but only get first element in promises chain

Hi all, I got a problem when using Parse.Promise.when in Parse Cloud Code. In my Parse Cloud Code, I want to update the arrival time of a list of flight records which already existed in my database. What I'm doing is pass a flight_list which is the…
Charlie
  • 35
  • 8
2
votes
1 answer

Fast nearest neighbour search using Parse as backend

So I have to implement a nearest neighbor search feature on my app, and I am currently using Parse as the backend. What I was doing till now was to perform a query and get the results and then sort them to get the top 20-30 results. But since my…
goelakash
  • 2,502
  • 4
  • 40
  • 56
2
votes
1 answer

Let user turn off different notification types using parse.com's cloud code

First time posting on here so bear with me. I am taking a dive into parse.com's cloud code without any knowledge of javascript so I could use a little help. I got an afterSave push notification working with Cloud Code but I need a way to allow users…
2
votes
1 answer

Parse.com cloud calls count as query?

I am uisng parse.com cloud code and calling this method - [PFCloud callFunctionInBackground:@"getTime" withParameters:@{} block:^(NSString *result, NSError *error) this calls on the cloud code for - Parse.Cloud.define("getTime",…
ozd
  • 1,194
  • 10
  • 34
2
votes
1 answer

Update many objects at once in Parse

I need to update a bunch of objects at once, and I can't find an efficient way to do it all at once since the docs suggest calling .getObjectInBackgroundWithID. I don't have ID's to every object, and even if I did I couldn't pass them all…
slider
  • 2,736
  • 4
  • 33
  • 69
2
votes
1 answer

Parse relation query help required

I'm new to Parse, and from WP background obviously. I have 2 classes on Parse: [prop] & [propmeta] The relation of these classes were like post & post_meta prop - addr - desc propmeta - prop(pointer to prop) - metakey - metaval Below is existing…
Ed On
  • 36
  • 4
2
votes
0 answers

Parse.com Cloud code function returns undefined in success promise

Here is what my cloud code function looks like: Parse.Cloud.define("usePromotionCode", function (request, response) { Parse.Cloud.useMasterKey(); var promotionCode = request.params.promotionCode; if (promotionCode == null) { …
reubenjohn
  • 1,351
  • 1
  • 18
  • 43
2
votes
0 answers

CloudCode getSessionToken() doesn't work anymore

I'm facing a strange problem. The follow code worked until a few weeks ago. Do you know why now the session token that I get is always undefined? Thanks in advance! Carmelo Parse.Cloud.define("UserSessionTokenWithFacebookId", function(request,…
Carmelo Gallo
  • 273
  • 4
  • 12
2
votes
1 answer

Sending a welcome email parse cloudcode with mailgun

I have a working mailgun server in my parse cloudcode for an iOS app. I have set up a series of emails to be triggered by status changes in the database. I have now set up a welcome email that was formerly hard coded into the app. I have it set up…
2
votes
2 answers

Parse Cloud Code Modifying Other Classes

Ok, so I am trying to use the afterSave function to change some values in a separate table. In my setup, the object that changes in the first table has knowledge of a unique field in the second. I feel like the process should go: afterSave -> call…
Josh Carter
  • 111
  • 1
  • 9
2
votes
1 answer

Parse Cloud Code request.user returns null on class beforeSave()

I want to limit the access for each created new item in the class Lista, but request.user is always set to null. How can I get the request originator through Cloud Code? Parse.Cloud.beforeSave("Lista", function (request, response) { var…