---
schema_version: "1"
id: cf4bbb07a8e2496fb23b6a074cd1bc32d3a1e5cadace3b47e10aa00a6b29c905
title: PardotBusinessUnitContext Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_ConnectAPI_PardotBusinessUnitContext_static_methods.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_PardotBusinessUnitContext_static_methods.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1abce1a65a345c12e0ecb55fa4afb8101622e8c0598339516b1de7b90dc2a837
description: Get the Pardot business units the context user has access to.These methods are for PardotBusinessUnitContext. All methods are static.Get the Pardot business units the context user has access to.Get the Pardot business units the context user has access to by specifying the current status.
---
# PardotBusinessUnitContext Class

Get the Pardot business units the context user has access to.

## Namespace

[ConnectApi](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_connect_api.htm "The ConnectApi namespace (also called Connect in Apex) provides classes for accessing the same data available in Connect REST API. Use Connect in Apex to create custom experiences in Salesforce.")

## PardotBusinessUnitContext Methods

These methods are for PardotBusinessUnitContext. All methods are static.

- **[getBusinessUnitContext()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_PardotBusinessUnitContext_static_methods.htm#apex_ConnectAPI_PardotBusinessUnitContext_getBusinessUnitContext_1)**  
    Get the Pardot business units the context user has access to.
- **[getBusinessUnitContextByIsCurrentStatus(isCurrent)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_PardotBusinessUnitContext_static_methods.htm#apex_ConnectAPI_PardotBusinessUnitContext_getBusinessUnitContextByIsCurrentStatus_2)**  
    Get the Pardot business units the context user has access to by specifying the current status.

### getBusinessUnitContext()

Get the Pardot business units the context user has access to.

#### API Version

55.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.PardotBusinessUnitContextOutput getBusinessUnitContext()

#### Return Value

Type: [ConnectApi.PardotBusinessUnitContextOutput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_pardot_business_unit_context_output.htm "Pardot business unit context.")

### getBusinessUnitContextByIsCurrentStatus(isCurrent)

Get the Pardot business units the context user has access to by specifying the current status.

#### API Version

55.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.PardotBusinessUnitContextOutput getBusinessUnitContextByIsCurrentStatus(Boolean isCurrent)

#### Parameters

isCurrent

Type: Boolean

Specifies whether to return only the business unit that’s selected as the context user's current business unit context in the business unit switcher of the Pardot Lightning app (true) or to return only the business units that aren’t selected as the context user's current business unit context (false).

#### Return Value

Type: [ConnectApi.PardotBusinessUnitContextOutput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_pardot_business_unit_context_output.htm "Pardot business unit context.")