Skip to content

Commit 3b159bf

Browse files
committed
added context info to cloud code
1 parent d21b8d1 commit 3b159bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

_includes/cloudcode/cloud-code.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,10 @@ You can use an `afterSave` handler to perform lengthy operations after sending a
243243

244244
## Using Request Context
245245

246-
State can be passed from a `beforeSave` handler to an `afterSave` handler in the Request Context. The following example sends emails to users who are being added to a [Parse.Role's users relation](https://parseplatform.org/Parse-SDK-JS/api/2.1.0/Parse.Role.html#getUsers) asynchronously, so the client receives a response before the emails complete sending:
246+
When saving a `Parse.Object` you may pass a `context` dictionary that is accessible in the Cloud Code Save Triggers. More info in the [JavaScript Guide]({{ site.baseUrl }}/js/guide/#cloud-code-context).
247+
248+
The context is also passed from a `beforeSave` handler to an `afterSave` handler. The following example sends emails to users who are being added to a [Parse.Role's users relation](https://parseplatform.org/Parse-SDK-JS/api/2.1.0/Parse.Role.html#getUsers) asynchronously, so the client receives a response before the emails complete sending:
249+
247250

248251
```javascript
249252
const beforeSave = function beforeSave(request) {

0 commit comments

Comments
 (0)