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
2 answers

How can you mix Parse.Promise with other forms of Promise, e.g. Bluebird / ES6 native Promises?

I want to run some of my Parse Cloud Code on Heroku (Node) to kick start the migration process out of Parse's hosted Cloud Code. One of the differences between the two environments is the fact that Parse SDK you use is different too. On node, I…
fatuhoku
  • 4,815
  • 3
  • 30
  • 70
2
votes
0 answers

Add watermark to image using cloud code in Parse.com

I have a class called Order that contains an array of pointers towards another class called PrescriptionImage . I want to query all these images and add a watermark to them. After that I need to save these images back (basically update them). I…
2
votes
0 answers

Parse.com error: Uncaught undefined

We are sometimes getting an 'Uncaught undefined' error from one of the beforeSave functions in cloud code. Majority of the time, the beforeSave runs fine. Even when it fails with the uncaught undefined error, the next attempt to save works fine.…
Lakshmi G
  • 21
  • 2
2
votes
1 answer

Can't save object in Cloud Code

I'm having an issue when running a function in Cloud Code. It is supposed to check the existence of an object and, if it does exist, create a new user: Parse.Cloud.define("createUser", function(request, response) { // Query the existing…
tomidelucca
  • 2,543
  • 1
  • 26
  • 26
2
votes
1 answer

Can Mandrill be asked to dry-run sending of an e-mail? (Parse Cloud Code)

I'm using a Parse Cloud Job to send e-mails to all our ~1000 of users with Mandrill right now. Currently, I use a Parse.Cloud.httpRequest like so: function sendNewsletterWithMandrill(info) { var mandrillBody =…
fatuhoku
  • 4,815
  • 3
  • 30
  • 70
2
votes
0 answers

Calling Cloud Function with ParseReact

With ParseReact, it is possible to call Parse Query in a reactive way. I try to call user defined function from Parse Cloud Code but I don't see how to do. So do you have example about calling a cloud function in ParseReact
EntrustName
  • 421
  • 6
  • 19
2
votes
2 answers

Why can't I use `useMasterKey()` in a `beforeSave` function?

My Parse app has a GiftCode collection which disallows the find operation at the class-level. I am writing a beforeSave cloud function that prevents duplicate codes from being entered by our team from Parse's…
namuol
  • 9,816
  • 6
  • 41
  • 54
2
votes
1 answer

Linking Google account with existing account created using email in Parse.com

I have implemented google login in parse. Here is my code: var querystring = require('querystring'); var _ = require('underscore'); var Buffer = require('buffer').Buffer; var googleValidateEndpoint =…
2
votes
1 answer

Test if a username is in the User class of Parse in cloud code

On our website I want people to be able to report if a video is uploaded on Youtube so we have 3 fields on our website. A Username, password and video Id field. When the user clicks the Html button we have it call a javascript function. function…
Dawson
  • 23
  • 4
2
votes
0 answers

parse.com POST call from angularjs CORS error

I am using parse.com cloud code and has a function inside, which is called using a https post call from my angularjs. When I test the same function from POSTMAN REST client it works. But from my domain it gives a CORS error XMLHttpRequest cannot…
Bala Sivagnanam
  • 863
  • 1
  • 15
  • 30
2
votes
0 answers

set email value in beforeSave Parse Cloud code

The issue: i need to set the email value for parse user in beforeSave trigger, because it will be null in case of facebook sign up i know that it can be sent from the client side and i fixed it in the next version but for now i am trying to get the…
2
votes
1 answer

Uncaught TypeError: Object # has no method '_isNullOrUndefined'
When running an aftersave on Parse.com, i'm sometimes getting the error: Uncaught TypeError: Object # has no method '_isNullOrUndefined' Most of the time, there is no problem at all. E2015-12-07T05:51:27.294Z]v2062 before_save triggered for…
2
votes
2 answers

Parse: Update Object from Cloud Code

I have created a background job to run every minute. The purpose of it is to delete old or outdated data within the database. In this case, the user submits a time which has an attached timestamp to it, and the two values are stored in arrays times…
bwc
  • 1,732
  • 1
  • 14
  • 27
2
votes
1 answer

App cloning Client KEY an App ID

I am surprised that, as I understand it, any app can potentially clone my Parse's Client KEY and App ID and act exactly as if it were my app, enabling and authenticating users on my app, having access to the same database and the same Cloud Code. So…
GPack
  • 2,494
  • 4
  • 19
  • 50
2
votes
2 answers

Parse.Query.each() chained promises

I'm writing a background job function on Parse.com CloudCode. The job needs to call the same function (that includes a Parse.Query.each()call) several times with different parameters, and I want to chain these calls with promises. Here's what I have…
artooras
  • 6,315
  • 9
  • 45
  • 78