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
3
votes
1 answer

Parse.com CloudCode add user to existing role not working

Here is the Parse javascript cloud code I am trying to use. As a new _User is created I want to add them to my 'Client' Role. Parse.Cloud.afterSave(Parse.User, function(request) { Parse.Cloud.useMasterKey(); query = new…
3
votes
3 answers

Delete specific object from Parse.com

In my cloud code I want to retrieve the first object in the "Messages" class. Then i want to grab some information from that object, send it to another class, and finally delete that object from the "Messages" class i originally pulled it from.…
ian
  • 1,002
  • 2
  • 12
  • 29
3
votes
1 answer

How many data can save in one Parse.Object.saveAll request? And how many number of request will be used for one Parse.Object.saveAll

Recently, I have some test on parse.com. I am now facing a problem of using Parse.Object.saveAll in background job. From the document in parse.com, it says that a background job can run for 15 minutes. I am now setting a background job to pour the…
paddy
  • 145
  • 2
  • 8
3
votes
2 answers

parse.com cloud code GET function with parameters?

I'm writing a cloud code function in parse and I'm trying to figure out how to handle parameters in the GET url. So I have a simple function like this: Parse.Cloud.define("someFunction", function(request, response) { // how can I use GET…
zumzum
  • 17,984
  • 26
  • 111
  • 172
2
votes
2 answers

Parse.Cloud.httpRequest returns 'undefined' instead of a response using POST method

I'm making a Parse.Cloud.httpRequest using the POST method to retrieve a token from an API in a Back4App Cloud Code Function called 'retrieveToken'. Parse.Cloud.define("retrieveToken", async(request) => { Parse.Cloud.httpRequest({ method:…
2
votes
0 answers

How does request.context in Parse Cloud Code work?

Back in Parse Server 3.0 update, there was an addition of request.context to pass data between BeforeSave and AfterSave as documented here: https://docs.parseplatform.org/cloudcode/guide/#using-request-context However, I'm having a bit of trouble…
Jayson
  • 528
  • 4
  • 13
2
votes
1 answer

Parse AfterSave trigger going in a loop

I am having trouble with my aftersave handler. So when a new user logs in, it checks to see of both tProfile and sProfile fields are empty, if so it saves saves an acl for the user and then sends an email to the user using nodemailer nmp package.…
2
votes
1 answer

Parse Server Cloud Code background job query and update objects

I have a Parse Server app hosted on back4app and I am running a Background Job that runs every minute and queries the Letters class, where the column deliveryDate is less or equal to the current date, here's my main.js file: // DELIVER A…
Frank Eno
  • 2,581
  • 2
  • 31
  • 54
2
votes
1 answer

response.error is not a function in Parse Cloud Code

I'm running parse-server and trying to create a parse cloud code function. I started with this oversimplified example: Parse.Cloud.define("createContent", function(request, response) { response.error("not implemented"); }); I can call my function…
tpimh
  • 446
  • 2
  • 9
  • 23
2
votes
1 answer

Adding new fields to ParseObjects in Parse Cloud code for client only. without saving to DB

When I want to retrieve ParseObjects (Posts) from parse db (mongo) to display in my Android app, I need to add new fields to ParseObject in the cloud code before delivering to client. these fields are only necessary for the client and thus I do not…
Hudi Ilfeld
  • 1,905
  • 2
  • 16
  • 25
2
votes
2 answers

Cloud code & push notifications may be unavailable

Here is an issue I am having with an app on Parse-Server (/Heroku). I keep getting the message: WARNING, Unable to connect to 'https://myapp.herokuapp.com/'. Cloud code and push notifications may be unavailable! Here is the complete log I have when…
Michel
  • 10,303
  • 17
  • 82
  • 179
2
votes
2 answers

Parse Cloud Code returns Parse Objects not allowed here

I am trying to retrieve data from the Database of Parse Server and I am facing a 500 Internal Error. My class is "Friends" and the column is "fromUser", which is a Pointer to <_User> class. The point is to get the usernames from the column…
giorgionasis
  • 394
  • 1
  • 7
  • 17
2
votes
1 answer

How check query response is empty Parse Sever?

I'd like to check if a Cloud Code query response is null or empty. If the query find something, the code works. When there are no objects matching the query, I cannot handle it. What should I do? Parse.Cloud.define("testing", function(request,…
2
votes
2 answers

How to return boolean from Cloud Code in Swift

I have a Cloud Code function that returns several objects, with some of them being Booleans. I would like to do something in my Swift code, based on the boolean values of the returned objects, as seen below. However, I keep getting multiple errors…
Dups
  • 201
  • 1
  • 2
  • 12
2
votes
3 answers

Parse Server + Cloud Code: beforeSave() on Parse.Object

I fear that I know the answer to this, but I'll throw it out here. Is there any way of getting a beforeSave method to trigger on all Parse.Object subclasses using Cloud Code? So I want to run some code on all saves, not any specific subclass of…
Darren Black
  • 1,030
  • 1
  • 9
  • 28