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

Parse Cloud Code - Query child with pointer to parent

I have a parent object "Listing" (think real estate listing), that can have multiple child objects "Image". I'm trying to implement a Cloud Code function that marks all the child objects as archived when I archive their parent. For some reason the…
That Guy
  • 460
  • 1
  • 7
  • 17
0
votes
1 answer

Parse.com cloud job: Array of pointers missing entries and containing null

I have a cloud function that loops over a class named drives. Each element in this class has an array with pointers to a class named driveResults. I made a cloud job that fetches the drives like this: First, I made a function called fetchPaginated…
otmezger
  • 10,410
  • 21
  • 64
  • 90
0
votes
0 answers

How to save the filed as pointer in parse knowing the object id in another class (table)?

Assume, If I have a two tables, let it be table 1 and table 2. I would like to save the object id of a data in table 1 to table 2. How to do this?. This is how I tried to get the object of the table 1 data with its object…
guru
  • 119
  • 1
  • 5
0
votes
1 answer

How to update a property of an object using Parse Cloud Code?

Every Parse Installation object instance in my Parse database has a pointer to a specific user. I have a background job that runs for every user, and what I want to do in this part of the background job is to set the respective user Installation's…
Ghobs
  • 839
  • 2
  • 14
  • 32
0
votes
1 answer

Deleting a Parse Object on a timer

My app allows the user to create some objects called "Meeting" with a date field and a boolean field. I need to create a job to delete these objects exactly 1 hour before that date if the boolean field is False. I thought a Background-job could be…
Diego
  • 366
  • 3
  • 18
0
votes
1 answer

Adding data to Users and then saving them using Parse Cloud Code

I'm trying to make a cloud function which saves the sender's objectId and username as an array, inside the array "request", for the target and have the target's objectId and username saved as an array, in the array "pending" for the sender.…
SMD01
  • 101
  • 1
  • 13
0
votes
1 answer

Parse concurrency in Cloud Code

Can someone explain me what happens in the following scenario: We have 2 Cloud Code functions. FunctionOne does a few async operations using promises, and modifies instances of class A. FunctionTwo deletes instances of class A What happens the…
Joris Mans
  • 6,024
  • 6
  • 42
  • 69
0
votes
0 answers

In Parse.com, how can I avoid cascading afterSave events on models?

Here is the use case: A is model, and B is a model related to A. On A's afterSave(), I send out a push notification. On B's afterSave(), I send out a push notification. But on B's afterSave(), I call save() on A, and this results in A's afterSave…
John Doe
  • 1,005
  • 2
  • 8
  • 23
0
votes
0 answers

How to parse a html String on the parse.com Cloude Code platform?

I use parse.com for a small and simple backend and I try to scrape a webpage for some image urls. I was able to load the html from the site into a string with parse.com Cloud Code. But now I need to convert the html into a document or another…
Janusz
  • 187,060
  • 113
  • 301
  • 369
0
votes
1 answer

"Nearest to point" query with additional constraint

I have a relatively standard Parse query to obtain the nearest items in the 'checkIn' class to an object's location as follows: var checkInObject = Parse.Object.extend('checkIn'); var query = new Parse.Query(checkInObject); query.near('location',…
user1596371
-1
votes
1 answer

Scheduled Job In Parse.com

I want to run Cloud Code with scheduled Job in Parse.(sashido.io) randomMentor function picks the some object in my Class with random number and saving it Today Class. When I call this method from Swift via PF.Cloud.callFunctionInBackground it works…
-1
votes
1 answer

Pros and Cons of converting an object to fullJSON from parse server

Are there any trade-offs in converting a Parse object to itsJSON format before sending it to the client? const data = await query.first(); res.success({ data: data.toJSON() }); I find shallow redux updates on my client, never being rendered if I…
-1
votes
1 answer

JSON text did not start with array or object

Working with an iOS app managing data on a Parse-Server (/Heroku). I have the following issue when trying to save data. Here is the code for the function where the problem happens: func saveDataBlockOnline(_ dico: [String:String]) { let…
Michel
  • 10,303
  • 17
  • 82
  • 179
-1
votes
1 answer

How to write Parse Cloud Code to make Thumbnails

Assume I have a Table ---------Image------------- imageFile (File) | thumbnail (File) | Post (a pointer to Post) Any idea how to write a cloud code to take a smaller version of that image in another column? For example, If a user uploaded a…
Hatim
  • 1,516
  • 1
  • 18
  • 30
-1
votes
1 answer

How to write query.equalTo multiple times in If condition (Parse)

I am just trying to check if user_id and comment_id is there in my database table and if they exists, then do x operation or else y operation. And, I am taking this user_id and comment_id at the runtime from the user. So how should I write my if…
Geek_KK
  • 192
  • 2
  • 11