---
title: "sfdcGetAccount"
canonical: "https://support.appfire.com/space/PSJ/15480906/sfdcGetAccount"
format: markdown
---
> Macro (aura-html)


# Syntax

**<span style="color: #3366ff">sfdcGetAccount(sfdcConnection, sfdcAccountId, [sfdcAPIVersion])</span>**

## Description

> Macro (excerpt)
> 
> Retrieves data related to an account from the Salesforce environment.

  


## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| sfdcConnection | [SFDCConnection](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15482612) | Yes | Salesforce Connection - it is the object resulted from the call to the **connectToSalesforce** function. |
| sfdcAccountId | string | Yes | ID of the Salesforce account to be retrieved. |
| sfdcAPIVersion | string | No | Salesforce API version to be called when creating the account, it should have the following form:  
"vXX.X" - eg: "v43.0", "v42.0".   
It is not required and if empty the latest available version will be used. |

## Return type

[SFDCAccount](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15482944) (predefined type)

## Example

The following example will get information about the account in Salesforce.

```
SFDCConnection conn = connectToSalesforce("SFDC_test");
logPrint("WARN", "Connected to SF: " + conn.instance_url + " - " + conn.access_token);

SFDCAccount acc;

acc = sfdcGetAccount(conn, "account ID",  "v43.0");
logPrint("WARN", "Retrieved the account: " + acc);
```

## See also

> Macro (contentbylabel)