---
schema_version: "1"
id: 4261dcfa5d434d1b175c7ce6962fbbcdb0cb571f5a29c67f863a88ca1c7d1ad5
title: Action Lightning Web Component ReadMe (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_action_lightning_web_component_readme.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_action_lightning_web_component_readme.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 451b09ffaa63a5a6315c2374884d490de44e32f67356190ab08d7590f08f376a
description: For the managed package runtime, this page contains the Action LWC ReadMe for each Vlocity release.
products:
  - Omnistudio
release: "264"
---
# Action Lightning Web Component ReadMe (Managed Package)

For the managed package runtime, this page contains the Action LWC ReadMe for each Vlocity release.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

## Vlocity Insurance and Health Summer '20

The _Action Lightning Web Component_ is the base component for all action components.

## Available c-action Attributes

To navigate the page after fetching data from a datasource, use the following attributes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e68">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e74">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e80">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e86">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e92">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e68 ">
              <p style="margin-bottom:0;">debug</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e74 ">
              <p style="margin-bottom:0;">true, false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e80 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e86 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e92 ">
              <p style="margin-bottom:0;">To enable debug mode, set to true. Prints fetched data inside template and updates JSON for testing.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e68 ">
              <p style="margin-bottom:0;">definition</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e74 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e80 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e86 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e92 ">
              <p style="margin-bottom:0;">Contains required object. See Available <em>definition</em> Attributes</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e68 ">
              <p style="margin-bottom:0;">disableCache</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e74 ">
              <p style="margin-bottom:0;">true, false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e80 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e86 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e92 ">
              <p style="margin-bottom:0;">To turn off caching, set to true.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e68 ">
              <p style="margin-bottom:0;">url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e74 ">
              <p style="margin-bottom:0;">URL</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e80 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e86 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e92 ">
              <p style="margin-bottom:0;">Reads the interpolated url.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example c-action Component

```
<c-action
    onclick={fetchData}
    ondata={onsuccesscallback}
    onerror={onerrorcallback}
  >
    <c-button label="Fetch Contact" type="button" variant="neutral"></c-button>
    <c-navigate-action
      target-type={_targetType}
      target-id={_targetId}
      target-name={_targetName}
      target-params={_targetParams}
      target-action={_targetAction}
      replace
    >
      <p>URL: {url}</p>
    </c-navigate-action>
  </c-action>

```

```
@track
  query = JSON.stringify({
    datasource: {
      type: "query",
      value: {
        query: "SELECT Id, name FROM Contact LIMIT 1"
      }
    },
    url: "/${data[0].Id}",
    target: "_blank",
    parameters: {},
    navigate: false
  });

fetchData(ev) {
    let action = ev.currentTarget;
    let def = JSON.parse(this.query);
    action.definition = this.query;
    action.triggerAction();
  }
// Passing these properties down to the navigate-action using attributes.
  onsuccesscallback(ev) {
    let result = ev.detail.result;
    this._targetType = "Record";
    this._targetId = result[0].Id;

    // Because attribute values are set using attributes, give the ui a chance to re-render.
    Promise.resolve().then(() => {
      let navigateAction = this.template.querySelector("c-navigate-action");
      navigateAction.navigate();

      this.url = ev.target.url;
      this.onResult(
        result.map(obj => {
          var rObj = obj;
          rObj.isEdit = false;
          return rObj;
        })
      );
    });
  }

  onerrorcallback(error) {
    console.log(error);
  }

```

## Available definition Attributes

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e259">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e265">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e271">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e277">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e283">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e259 ">
              <p style="margin-bottom:0;">datasource</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e265 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e271 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e277 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e283 ">
              <p style="margin-bottom:0;">Defines the source from which to fetch the data. See <em>Datasource Lightning Web Component</em> for more information.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e259 ">
              <p style="margin-bottom:0;">data</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e265 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e271 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e277 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e283 ">
              <p style="margin-bottom:0;">To use the data fetched from the datasource dierctly inside the definition, add data here.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e259 ">
              <p style="margin-bottom:0;">isTrackingDisabled</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e265 ">
              <p style="margin-bottom:0;">true, false (Default: true)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e271 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e277 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e283 ">
              <p style="margin-bottom:0;">To disable tracking, set to false.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e259 ">
              <p style="margin-bottom:0;">navigateTo</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e265 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e271 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e277 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e283 ">
              <p style="margin-bottom:0;">Defines the navigation service object. If url is not present, this object is considered for navigation and is interpolated if type and value are passed. See <a href="https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.use_navigate" target="_blank">Salesforce documentation on navigation</a>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e259 ">
              <p style="margin-bottom:0;">navigate</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e265 ">
              <p style="margin-bottom:0;">true or false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e271 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e277 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e283 ">
              <p style="margin-bottom:0;">Specifies whether the url navigates or not.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e259 ">
              <p style="margin-bottom:0;">parameters</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e265 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e271 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e277 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e283 ">
              <p style="margin-bottom:0;">Adds all fields as url parameters only if <em>url</em> is set.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e259 ">
              <p style="margin-bottom:0;">target</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e265 ">
              <p style="margin-bottom:0;">current window or new window</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e271 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e277 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e283 ">
              <p style="margin-bottom:0;">Specifies which window the url opens. Works only if the url is relative and is not salesforce object data.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e259 ">
              <p style="margin-bottom:0;">trackingObj</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e265 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e271 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e277 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e283 ">
              <p style="margin-bottom:0;">Specifies the tracking object of the container Flexcard.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e259 ">
              <p style="margin-bottom:0;">url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e265 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e271 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e277 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e283 ">
              <p style="margin-bottom:0;">Defines the navigation url, which is interpolated if type and value are passed. The <em>url</em> is given higher preference over the <em>navigateTo</em>object.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example definition JSON

## Navigate to View Page by Navigation Object

```
{
  "datasource": {
    "type": "query",
    "value": {
      "query": "SELECT Id, name FROM Contact LIMIT 1"
    }
  },
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "${data[0].Id}",
      "actionName": "view"
    }
  },
  "navigate": true
}
```

## Navigate to View Page by URL

```
{
  "datasource": {
    "type": "query",
    "value": {
      "query": "SELECT Id, name FROM Contact LIMIT 1"
    }
  },
  "url": "/${data[0].Id}",
  "navigate": true
}
```

## Navigation to Object with Direct Data

```
{
  "data": {
    "Id": "001B000000qBQXDIA4"
  },
  "url": "/${data.Id}",
  "navigate": true
}
```

## Navigate to Object Home Page

```
{
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "Account",
      "actionName": "home"
    }
  },
  "navigate": true
}
```

## Navigate to Account Create New Screen

```
{
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "Account",
      "actionName": "new"
    }
  },
  "navigate": true
}
```

## Available c-action Attributes for Links

To perform an action by clicking on the link, use the following attributes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e644">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e650">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e656">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e662">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e668">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">action-labelclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Adds an extra class to the action label <a href="http://element.to/" target="_blank">element.To</a> add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">action-wrapperclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Adds an extra class to the action wrapper element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">context-id</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Sets action context Id.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">icon-color</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Sets the color of the icon.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">icon-extraclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Adds an extra class to the icon element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">icon-size</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">
              <p style="margin-bottom:0;">xx-small, small, medium, large, x-large</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Sets the size of the icon.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">icon-url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">
              <p style="margin-bottom:0;">URL</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Sets the icon URL. Use with Newport Design System (NDS) theme only.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">icon-wrapperclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Adds an extra class to the icon wrapper element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">s-object-type</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">
              <p style="margin-bottom:0;">sObject</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Sets action sObject type.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">state-action</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Sets the action Info.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">state-obj</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Contains the layout/card records.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">styles</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">To set inline styles of label and text-align property. it should be in this formt <code>style = { "label": "", "textAlign" : ""}</code>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e644 ">
              <p style="margin-bottom:0;">theme</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e650 ">
              <p style="margin-bottom:0;">slds, nds (Default: slds)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e656 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e662 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e668 ">
              <p style="margin-bottom:0;">Specifies which theme to use.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example c-action Component (inside Vlocity Card state template)

```
 <c-action
    icon-extraclass="slds-m-right_small"
    state-obj={obj}
    context-id={contextId}
    s-object-type={sObjectType}
    state-action={item}
    action-wrapperclass="slds-size--1-of-1"
    action-labelclass="slds-size--7-of-8"
    icon-wrapperclass="slds-size--1-of-8"
  ></c-action>
```

## Vlocity Insurance and Health Spring '20

The _Action Lightning Web Component_ is the base component for all action components.

## Available c-action Attributes

To navigate the page after fetching data from a data source, use the following attributes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1087">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1093">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1099">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1105">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1111">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1087 ">
              <p style="margin-bottom:0;">debug</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1093 ">
              <p style="margin-bottom:0;">true, false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1099 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1105 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1111 ">
              <p style="margin-bottom:0;">To enable debug mode, set to true. Prints fetched data inside the template and updates JSON for testing.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1087 ">
              <p style="margin-bottom:0;">definition</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1093 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1099 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1105 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1111 ">
              <p style="margin-bottom:0;">Contains the required object. See Available <em>definition</em>Attributes</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1087 ">
              <p style="margin-bottom:0;">disableCache</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1093 ">
              <p style="margin-bottom:0;">true, false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1099 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1105 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1111 ">
              <p style="margin-bottom:0;">To turn off caching, set to true.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1087 ">
              <p style="margin-bottom:0;">url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1093 ">
              <p style="margin-bottom:0;">URL</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1099 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1105 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1111 ">
              <p style="margin-bottom:0;">Reads the interpolated URL.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Available definition Attributes

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1266">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1272">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1278">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1284">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1290">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1266 ">
              <p style="margin-bottom:0;">datasource</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1272 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1278 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1284 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1290 ">
              <p style="margin-bottom:0;">Defines the source from which to fetch the data. See <em>Datasource Lightning Web Component</em> for more information.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1266 ">
              <p style="margin-bottom:0;">data</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1272 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1278 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1284 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1290 ">
              <p style="margin-bottom:0;">To use the data fetched from the <em>datasource</em> directly inside the definition, add data here.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1266 ">
              <p style="margin-bottom:0;">navigateTo</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1272 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1278 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1284 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1290 ">
              <p style="margin-bottom:0;">Defines the navigation service object. If URL is not present, this object is considered for navigation and is interpolated if type and value are passed. See <a href="https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.use_navigate" target="_blank">Salesforce documentation on navigation</a>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1266 ">
              <p style="margin-bottom:0;">navigate</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1272 ">
              <p style="margin-bottom:0;">true or false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1278 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1284 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1290 ">
              <p style="margin-bottom:0;">Specifies whether the URL navigates or not.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1266 ">
              <p style="margin-bottom:0;">parameters</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1272 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1278 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1284 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1290 ">
              <p style="margin-bottom:0;">Adds all fields as URL parameters only if <em>url</em> is set.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1266 ">
              <p style="margin-bottom:0;">target</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1272 ">
              <p style="margin-bottom:0;">current window or new window</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1278 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1284 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1290 ">
              <p style="margin-bottom:0;">Specifies which window the URL opens. Works only if the URL is relative and is not salesforce object data.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1266 ">
              <p style="margin-bottom:0;">url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1272 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1278 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1284 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1290 ">
              <p style="margin-bottom:0;">Defines the navigation URL, which is interpolated if type and value are passed. The <em>url</em> is given a higher preference over the <em>navigateTo</em>object.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example c-action Component

```
<c-action
    onclick={fetchData}
    ondata={onsuccesscallback}
    onerror={onerrorcallback}
  >
    <c-button label="Fetch Contact" type="button" variant="neutral"></c-button>
    <c-navigate-action
      target-type={_targetType}
      target-id={_targetId}
      target-name={_targetName}
      target-params={_targetParams}
      target-action={_targetAction}
      replace
    >
      <p>URL: {url}</p>
    </c-navigate-action>
  </c-action>

```

```
@track
  query = JSON.stringify({
    datasource: {
      type: "query",
      value: {
        query: "SELECT Id, name FROM Contact LIMIT 1"
      }
    },
    url: "/${data[0].Id}",
    target: "_blank",
    parameters: {},
    navigate: false
  });

fetchData(ev) {
    let action = ev.currentTarget;
    let def = JSON.parse(this.query);
    action.definition = this.query;
    action.triggerAction();
  }
// I'm passing these properties down to the navigate-action via
  // attributes.
  onsuccesscallback(ev) {
    let result = ev.detail.result;
    this._targetType = "Record";
    this._targetId = result[0].Id;

    // Because we're setting the attribute values via attributes,
    // we need to give the ui a chance to re-render.
    Promise.resolve().then(() => {
      let navigateAction = this.template.querySelector("c-navigate-action");
      navigateAction.navigate();

      this.url = ev.target.url;
      this.onResult(
        result.map(obj => {
          var rObj = obj;
          rObj.isEdit = false;
          return rObj;
        })
      );
    });
  }

  onerrorcallback(error) {
    console.log(error);
  }

```

## Examples for definition JSON

## Navigate to View Page by Navigation Object

```
{
  "datasource": {
    "type": "query",
    "value": {
      "query": "SELECT Id, name FROM Contact LIMIT 1"
    }
  },
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "${data[0].Id}",
      "actionName": "view"
    }
  },
  "navigate": true
}
```

## Navigate to View Page by URL

```
{
  "datasource": {
    "type": "query",
    "value": {
      "query": "SELECT Id, name FROM Contact LIMIT 1"
    }
  },
  "url": "/${data[0].Id}",
  "navigate": true
}
```

## Navigation to Object with Direct Data

```
{
  "data": {
    "Id": "001B000000qBQXDIA4"
  },
  "url": "/${data.Id}",
  "navigate": true
}
```

## Navigate to Object Home Page

```
{
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "Account",
      "actionName": "home"
    }
  },
  "navigate": true
}
```

## Navigate to Account Create New Screen

```
{
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "Account",
      "actionName": "new"
    }
  },
  "navigate": true
}
```

## Available c-action Attributes for Links

To perform an action by clicking on the link, use the following attributes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1612">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1618">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1624">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1630">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e1636">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">action-labelclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Adds an extra class to the action label <a href="http://element.to/" target="_blank">element.To</a> add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">action-wrapperclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Adds an extra class to the action wrapper element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">context-id</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Sets action context Id.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">icon-extraclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Adds an extra class to the icon element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">icon-size</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">
              <p style="margin-bottom:0;">xx-small, small, medium, large, x-large</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Sets the size of the icon.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">icon-url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">
              <p style="margin-bottom:0;">URL</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Sets the icon URL. Use with Newport Design System (NDS) theme only.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">icon-wrapperclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Adds an extra class to the icon wrapper element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">s-object-type</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">
              <p style="margin-bottom:0;">sObject</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Sets action sObject type.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">state-action</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Sets the action Info.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">state-obj</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Contains the layout/card records.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1612 ">
              <p style="margin-bottom:0;">theme</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1618 ">
              <p style="margin-bottom:0;">slds, nds (Default: slds)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1624 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1630 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e1636 ">
              <p style="margin-bottom:0;">Specifies which theme to use.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example c-action Component (inside Vlocity Card state template)

```
 <c-action
    icon-extraclass="slds-m-right_small"
    state-obj={obj}
    context-id={contextId}
    s-object-type={sObjectType}
    state-action={item}
    action-wrapperclass="slds-size--1-of-1"
    action-labelclass="slds-size--7-of-8"
    icon-wrapperclass="slds-size--1-of-8"
  ></c-action>
```

## Vlocity Insurance and Health Winter '20 and Vlocity CME Spring '20

The _Action Lightning Web Component_ is the base component for all action components.

## Available c-action Attributes for Navigation

To navigate the page after fetching data from a datasource, use the following attributes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2001">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2007">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2013">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2019">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2025">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2001 ">
              <p style="margin-bottom:0;">debug</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2007 ">
              <p style="margin-bottom:0;">true, false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2013 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2019 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2025 ">
              <p style="margin-bottom:0;">To enable debug mode, set to true. Prints fetched data inside template and updates JSON for testing.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2001 ">
              <p style="margin-bottom:0;">definition</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2007 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2013 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2019 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2025 ">
              <p style="margin-bottom:0;">Contains required object. See Available <em>definition</em> Attributes</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2001 ">
              <p style="margin-bottom:0;">url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2007 ">
              <p style="margin-bottom:0;">URL</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2013 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2019 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2025 ">
              <p style="margin-bottom:0;">Reads the interpolated url.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Available Definition Attributes

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2151">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2157">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2163">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2169">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2175">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2151 ">
              <p style="margin-bottom:0;">datasource</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2157 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2163 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2169 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2175 ">
              <p style="margin-bottom:0;">Defines the source from which to fetch the data. See <em>Datasource Lightning Web Component</em> for more information.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2151 ">
              <p style="margin-bottom:0;">data</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2157 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2163 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2169 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2175 ">
              <p style="margin-bottom:0;">To use the data fetched from the datasource directly inside the definition, add data here.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2151 ">
              <p style="margin-bottom:0;">navigateTo</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2157 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2163 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2169 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2175 ">
              <p style="margin-bottom:0;">Defines the navigation service object. If url is not present, this object will be considered for navigation and is interpolated if type and value are passed.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2151 ">
              <p style="margin-bottom:0;">navigate</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2157 ">
              <p style="margin-bottom:0;">true or false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2163 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2169 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2175 ">
              <p style="margin-bottom:0;">Specifies whether the url has to navigate or not.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2151 ">
              <p style="margin-bottom:0;">parameters</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2157 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2163 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2169 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2175 ">
              <p style="margin-bottom:0;">Adds all fields as url parameters only if <em>url</em> is set.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2151 ">
              <p style="margin-bottom:0;">target</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2157 ">
              <p style="margin-bottom:0;">current window or new window</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2163 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2169 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2175 ">
              <p style="margin-bottom:0;">Specifies which window the url opens. Works only if the url is relative and is not salesforce object data.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2151 ">
              <p style="margin-bottom:0;">url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2157 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2163 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2169 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2175 ">
              <p style="margin-bottom:0;">Defines the navigation url, which is interpolated if type and value are passed. The <em>url</em> is given higher preference over the <em>navigateTo</em> object.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example c-action Component

```
<c-action
    onclick={fetchData}
    ondata={onsuccesscallback}
    onerror={onerrorcallback}
  >
    <c-button label="Fetch Contact" type="button" variant="neutral"></c-button>
    <c-navigate-action
      target-type={_targetType}
      target-id={_targetId}
      target-name={_targetName}
      target-params={_targetParams}
      target-action={_targetAction}
      replace
    >
      <p>URL: {url}</p>
    </c-navigate-action>
  </c-action>
```

```
@track
  query = JSON.stringify({
    datasource: {
      type: "query",
      value: {
        query: "SELECT Id, name FROM Contact LIMIT 1"
      }
    },
    url: "/${data[0].Id}",
    target: "_blank",
    parameters: {},
    navigate: false
  });

fetchData(ev) {
    let action = ev.currentTarget;
    let def = JSON.parse(this.query);
    action.definition = this.query;
    action.triggerAction();
  }
// I'm passing these properties down to the navigate-action via
  // attributes.
  onsuccesscallback(ev) {
    let result = ev.detail.result;
    this._targetType = "Record";
    this._targetId = result[0].Id;

    // Because we're setting the attribute values via attributes,
    // we need to give the ui a chance to re-render.
    Promise.resolve().then(() => {
      let navigateAction = this.template.querySelector("c-navigate-action");
      navigateAction.navigate();

      this.url = ev.target.url;
      this.onResult(
        result.map(obj => {
          var rObj = obj;
          rObj.isEdit = false;
          return rObj;
        })
      );
    });
  }

  onerrorcallback(error) {
    console.log(error);
  }
```

## Examples for definition JSON

## Navigate to View Page by Navigation Object

```
{
  "datasource": {
    "type": "query",
    "value": {
      "query": "SELECT Id, name FROM Contact LIMIT 1"
    }
  },
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "${data[0].Id}",
      "actionName": "view"
    }
  },
  "navigate": true
}
```

## Navigate to View Page by URL

```
{
  "datasource": {
    "type": "query",
    "value": {
      "query": "SELECT Id, name FROM Contact LIMIT 1"
    }
  },
  "url": "/${data[0].Id}",
  "navigate": true
}
```

## Navigation to Object with Direct Data

```
{
  "data": {
    "Id": "001B000000qBQXDIA4"
  },
  "url": "/${data.Id}",
  "navigate": true
}
```

## Navigate to Object Home Page

```
{
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "Account",
      "actionName": "home"
    }
  },
  "navigate": true
}
```

## Navigate to Account Create New Screen

```
{
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "Account",
      "actionName": "new"
    }
  },
  "navigate": true
}
```

## Available c-action Attributes for Links

To perform an action by clicking on the link, use the following attributes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2490">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2496">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2502">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2508">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d201882e2514">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">action-labelclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Adds an extra class to the action label element.To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">action-wrapperclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Adds an extra class to the action wrapper element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">context-id</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Sets action context Id.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">icon-extraclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Adds an extra class to the icon element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">icon-size</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">
              <p style="margin-bottom:0;">xx-small, small, medium, large, x-large</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Sets the size of the icon.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">icon-url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">
              <p style="margin-bottom:0;">URL</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Sets the icon URL. Use with Newport Design System (NDS) theme only.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">icon-wrapperclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Adds an extra class to the icon wrapper element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">s-object-type</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">
              <p style="margin-bottom:0;">sObject</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Sets action sObject type.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">state-action</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Sets the action Info.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">state-obj</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Contains the layout/card records.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2490 ">
              <p style="margin-bottom:0;">theme</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2496 ">
              <p style="margin-bottom:0;">slds, nds (Default: slds)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2502 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2508 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d201882e2514 ">
              <p style="margin-bottom:0;">Specifies which theme to use.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example c-action Component (inside Vlocity Card state template)

```
 <c-action
    icon-extraclass="slds-m-right_small"
    state-obj={obj}
    context-id={contextId}
    s-object-type={sObjectType}
    state-action={item}
    action-wrapperclass="slds-size--1-of-1"
    action-labelclass="slds-size--7-of-8"
    icon-wrapperclass="slds-size--1-of-8"
  ></c-action>
```

## Vlocity Insurance and Health Summer '19 and Vlocity CME Fall '19

The _Action Lightning Web Component_ is the base component for all action components.

## Available c-action Attributes for Navigation

To navigate the page after fetching data from a datasource, use the following attributes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e2875">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e2881">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e2887">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e2893">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e2899">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2875 ">
              <p style="margin-bottom:0;">debug</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2881 ">
              <p style="margin-bottom:0;">true, false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2887 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2893 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2899 ">
              <p style="margin-bottom:0;">To enable debug mode, set to true. Prints fetched data inside template and updates JSON for testing.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2875 ">
              <p style="margin-bottom:0;">definition</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2881 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2887 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2893 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2899 ">
              <p style="margin-bottom:0;">Contains required object. See Available <em>definition</em> Attributes</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2875 ">
              <p style="margin-bottom:0;">url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2881 ">
              <p style="margin-bottom:0;">URL</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2887 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2893 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e2899 ">
              <p style="margin-bottom:0;">Reads the interpolated url.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Available definition Attributes

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3025">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3031">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3037">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3043">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3049">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3025 ">
              <p style="margin-bottom:0;">datasource</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3031 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3037 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3043 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3049 ">
              <p style="margin-bottom:0;">Defines the source from which to fetch the data. See <em>Datasource Lightning Web Component</em> for more information.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3025 ">
              <p style="margin-bottom:0;">data</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3031 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3037 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3043 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3049 ">
              <p style="margin-bottom:0;">To use the data fetched from the datasource directly inside the definition, add data here.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3025 ">
              <p style="margin-bottom:0;">navigateTo</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3031 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3037 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3043 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3049 ">
              <p style="margin-bottom:0;">Defines the navigation service object. If url is not present, this object will be considered for navigation and is interpolated if type and value are passed. See <a href="https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.use_navigate" target="_blank">Salesforce documentation on navigation</a>.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3025 ">
              <p style="margin-bottom:0;">navigate</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3031 ">
              <p style="margin-bottom:0;">true or false (Default: false)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3037 ">
              <p style="margin-bottom:0;">boolean</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3043 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3049 ">
              <p style="margin-bottom:0;">Specifies whether the url has to navigate or not.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3025 ">
              <p style="margin-bottom:0;">parameters</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3031 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3037 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3043 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3049 ">
              <p style="margin-bottom:0;">Adds all fields as url parameters only if<em>url</em> is set.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3025 ">
              <p style="margin-bottom:0;">target</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3031 ">
              <p style="margin-bottom:0;">current window or new window</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3037 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3043 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3049 ">
              <p style="margin-bottom:0;">Specifies which window the url opens. Works only if the url is relative and is not salesforce object data.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3025 ">
              <p style="margin-bottom:0;">url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3031 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3037 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3043 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3049 ">
              <p style="margin-bottom:0;">Defines the navigation url, which is interpolated if type and value are passed. The <em>url</em> is given higher preference over the<em>navigateTo</em> object.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example c-action Component

```
<c-action
    onclick={fetchData}
    ondata={onsuccesscallback}
    onerror={onerrorcallback}
  >
    <c-button label="Fetch Contact" type="button" variant="neutral"></c-button>
    <c-navigate-action
      target-type={_targetType}
      target-id={_targetId}
      target-name={_targetName}
      target-params={_targetParams}
      target-action={_targetAction}
      replace
    >
      <p>URL: {url}</p>
    </c-navigate-action>
  </c-action>
```

```
@track
  query == JSON.stringify({
    datasource: {
      type: "query",
      value: {
        query: "SELECT Id, name FROM Contact LIMIT 1"
      }
    },
    url: "/${data[0].Id}",
    target: "_blank",
    parameters: {},
    navigate: false
  });

fetchData(ev) {
    let action == ev.currentTarget;
    let def == JSON.parse(this.query);
    action.definition == this.query;
    action.triggerAction();
  }
// I'm passing these properties down to the navigate-action via
  // attributes.
  onsuccesscallback(ev) {
    let result == ev.detail.result;
    this._targetType == "Record";
    this._targetId == result[0].Id;

    // Because we're setting the attribute values via attributes,
    // we need to give the ui a chance to re-render.
    Promise.resolve().then(() => {
      let navigateAction == this.template.querySelector("c-navigate-action");
      navigateAction.navigate();

      this.url == ev.target.url;
      this.onResult(
        result.map(obj => {
          var rObj == obj;
          rObj.isEdit == false;
          return rObj;
        })
      );
    });
  }

  onerrorcallback(error) {
    console.log(error);
  }
```

## Examples for definition JSON

## Navigate to View Page by Navigation Object

```
{
  "datasource": {
    "type": "query",
    "value": {
      "query": "SELECT Id, name FROM Contact LIMIT 1"
    }
  },
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "${data[0].Id}",
      "actionName": "view"
    }
  },
  "navigate": true
}
```

## Navigate to View Page by URL

```
{
  "datasource": {
    "type": "query",
    "value": {
      "query": "SELECT Id, name FROM Contact LIMIT 1"
    }
  },
  "url": "/${data[0].Id}",
  "navigate": true
}
```

## Navigation to Object with Direct Data

```
{
  "data": {
    "Id": "001B000000qBQXDIA4"
  },
  "url": "/${data.Id}",
  "navigate": true
}
```

## Navigate to Object Home Page

```
{
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "Account",
      "actionName": "home"
    }
  },
  "navigate": true
}
```

## Navigate to Account Create New Screen

```
{
  "navigateTo": {
    "type": "standard__objectPage",
    "attributes": {
      "objectApiName": "Account",
      "actionName": "new"
    }
  },
  "navigate": true
}
```

## Available c-action Attributes for Links

To perform an action by clicking on the link, use the following attributes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3368">
              <p style="margin-bottom:0;">Attribute</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3374">
              <p style="margin-bottom:0;">Value</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3380">
              <p style="margin-bottom:0;">Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3386">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d201882e3392">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">action-labelclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Adds an extra class to the action label element.To add multiple classes, use a space to separate each class, such as `classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">action-wrapperclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Adds an extra class to the action wrapper element. To add multiple classes, use a space to separate each class, such as `classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">context-id</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Sets action context Id.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">icon-extraclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Adds an extra class to the icon element. To add multiple classes, use a space to separate each class, such as `classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">icon-size</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">
              <p style="margin-bottom:0;">xx-small, small, medium, large, x-large</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Sets the size of the icon.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">icon-url</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">
              <p style="margin-bottom:0;">URL</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Sets the icon URL. Use with Newport Design System (NDS) theme only.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">icon-wrapperclass</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">&nbsp;</td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Adds an extra class to the icon wrapper element. To add multiple classes, use a space to separate each class, such as `classone classtwo'.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">s-object-type</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">
              <p style="margin-bottom:0;">sObject</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Sets action sObject type.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">state-action</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">
              <p style="margin-bottom:0;">yes</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Sets the action Info.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">state-obj</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">
              <p style="margin-bottom:0;">JSON</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">object</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Contains the layout/card records.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3368 ">
              <p style="margin-bottom:0;">theme</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3374 ">
              <p style="margin-bottom:0;">slds, nds (Default: slds)</p>
            </td>

            <td data-label="Type" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3380 ">
              <p style="margin-bottom:0;">string</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3386 ">&nbsp;</td>

            <td data-label="Description" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d201882e3392 ">
              <p style="margin-bottom:0;">Specifies which theme to use.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example c-action Component (inside Vlocity Card state template)

```
 <c-action
    icon-extraclass="slds-m-right_small"
    state-obj={obj}
    context-id={contextId}
    s-object-type={sObjectType}
    state-action={item}
    action-wrapperclass="slds-size--1-of-1"
    action-labelclass="slds-size--7-of-8"
    icon-wrapperclass="slds-size--1-of-8"
  ></c-action>
```