---
schema_version: "1"
id: 3233e4474cfe61b603172b1d61c3e3e7cc0cb9f492d6c75e685a062a8f512b09
title: getCustomAction
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/case_feed_dev_guide/guides/quickactions/quickaction-api-getcustomaction.md
canonical_url: https://developer.salesforce.com/docs/platform/case-feed-dev-guide/guide/quickaction-api-getcustomaction.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 820f7a23201852924af8fada49850caba2ae40a9ed41cbac4cea703e46d9283b
products:
  - Publisher and Quick Action Developer Guide
  - Platform Developer Content
---

# getCustomAction

Allows custom components to access a custom quick action and pass data or messages to it.

## Arguments

|Name|Type|Description|
|----|----|-----------|
|actionName|string|The name of the quick action that you want to access.|

The actionName parameter starts with the Salesforce object, followed by the quick action name. For example:

```nolang
actionName: "Case.MyCustomAction"
```

## Sample Code

```javascript
actionApi.getCustomAction(args).then(function(customAction) {
  if (customAction) {
    customAction.subscribe(function(data) {
      // Handle quick action message
    });
    customAction.publish({
      message : "Hello Custom Action",
      Param1 : "This is a parameter"
    });
  }
}).catch(function(error) {
  // We can't find that custom action.
});
```

## Response

Returns a Promise. Success resolves to a response object. The Promise is rejected on error response.

```nolang
success: boolean,
customAction: {
  subscribe: function,
  publish: function,
  unsubscribe: function
},
unavailableAction: boolean,
errors: []
```

