Retrieve

Overview 

Retrieve an account based on the specified criteria

Syntax 

Retrieve(1)

Function Properties 

OrdinalTypeDescription
1stringRequiredCriteria used to search for the account. Use a filter expression or a JSON object containing filter and additional search parameters.

Examples 

This sample code retrieves an account based on the specified filter criteria:

1var getAcct = Account.Retrieve({Property:"CustomerKey",SimpleOperator:"equals",Value:"MyAccount"});

This sample code queries across all applicable accounts and retrieves an account based on the filter criteria:

1var query = {};
2
3query.Filter = '{Property:"CustomerKey",SimpleOperator:"equals",Value:"MyAccount"}';
4query.QueryAllAccounts = true;
5
6var getAcct = Account.Retrieve(query);