---
schema_version: "1"
id: 74528c4180e6257a67ffdbc9b399c0e931bd066c5bb3a745fb22dd1a216d9c99
title: call(action, args)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/financial_services_cloud_object_reference/apex_industriespersonalizedfinance_CDPQuery_call.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.financial_services_cloud_object_reference.meta/financial_services_cloud_object_reference/apex_industriespersonalizedfinance_CDPQuery_call.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: fe569a00704f8aca66c428ab5ef9ad3b68c7d350a7d6bf3e3b8644c547d9fa41
description: This method calls one of the available CDPQuery actions and passes arguments to that action.
---
# call(action, args)

This method calls one of the available CDPQuery actions and passes arguments to that action.

## Signature

public Object call(String action, Map<String, Object\> args)

## Parameters

action

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_methods_system_string.htm)

The action to call. The value must be one of the following actions:

- getCalculatedInsight — Invokes the [queryCalculatedInsights](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_ConnectAPI_CdpQuery_static_methods.htm#apex_ConnectAPI_CdpQuery_queryCalculatedInsights_2) method of the CdpQuery Apex class, specifying only the ciName, orderBy, and filters parameters.
- hasRecordAccess — Returns true if the current user has access to the specified Account.
- isPersonAccount — Returns true if the specified Account is a Person Account.

args

Type: Map<[String](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_methods_system_string.htm), Object>

The arguments passed to the corresponding action. All actions require input, output, and options arguments, but these arguments can be empty if the action doesn’t use them. Values listed here are for the input argument.

- getCalculatedInsight — Accepts calculatedInsightName, orderBy, and filters keys.
- hasRecordAccess — Accepts an AccountId.
- isPersonAccount — Accepts an AccountId.

## Return Value

Type: Map<String, Object>

The return values of the corresponding action, returned in the output argument.

- getCalculatedInsight — Returns the data property from a [CdpQueryOutput](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_connectapi_output_cdp_query_output.htm) object under the calculatedInsightData key.
- hasRecordAccess — Returns true in the hasRecordAccess key if the current user has access to the specified Account. Returns an additional errorMessage key if hasRecordAccess is false.
- isPersonAccount — Returns true in the isPersonAccount key if the specified Account is a Person Account. Returns an additional errorMessage key if isPersonAccount is false.

## Usage

To use this method in an Integration Procedure, specify the class in the Remote Class property, the action in the Remote Method property, and the arguments in the Additional Input property.