0

I'm fairly new to Parse and Webhooks. I was recently assigned to study on Parse Servers and require the use of Webhook when an update to the database occur.

A high level overview is such: edit -> webhook trigger -> update database

Now, I've read on this.

Using the beforeSave trigger, and I'm confused... How am I suppose to trigger the beforeSave/beforeDelete, etc triggers in java?

is it similar to how we call a Cloud Code function where:

in Cloud Code:

Parse.Cloud.beforeSave("nameOfFunction", function(request, response) { response.success(); });

To call the function in java:

ParseCloud.callFunctionInBackground("nameOfFunction", params, new FunctionCallback<Float>() {
   void done(Float ratings, ParseException e) {
       if (e == null) {
          // ratings is 4.5
       }
   }
});

to make a trigger?

Please enlighten me!

iehrlich
  • 3,572
  • 4
  • 34
  • 43
Positive-One
  • 89
  • 1
  • 12

1 Answers1

1

beforeSave and afterSave triggers are automatically called if they exist.

I actually literally just wrote this answer which has a lot of pertinent info.

These triggers go in cloud code only. There isn't a client side variant.

Jake T.
  • 4,308
  • 2
  • 20
  • 48