# setCallback()

Sets the callback function that is executed after an Apex action returns.

## Signature

`setCallback (Object scope, function callback, String name)`

## Parameters

***scope*:** Type: `Object`. The scope in which the function is executed. Always set this parameter to the keyword `this`.

***callback*:** Type: `function`. The callback to invoke after the Apex action returns.

***name*:** Type: `String`. Defaults to "ALL" which registers callbacks for the "SUCCESS", "ERROR", and "INCOMPLETE" states.

**See Also**

- [Calling a Server-Side Action](/docs/platform/aura-platform/guide/controllers-server-actions-call.md)
- [Action States](/docs/platform/aura-platform/guide/controllers-server-actions-states.md)
