Search

Execute SOQL

Last Updated: Nov 4, 2020

Articles

Use this function to execute a given SOQL query and fetche the result.

Syntax

Execute SOQL (token, username, password, SOQL)

Parameters

Input Parameter Name Description
token Token used to connect to particular salesforce account
username Salesforce account username
password Salesforce account password
SOQL SOQL query to be executed

Returns

Return Value Description
Output
  • On Success: 1, Query result
  • On Failure: 0, Error Message

Sample

Execute SOQL (ABCDCEF, new_user, pass@123, SELECT Id FROM Records)

  • Uses the token ‘ABCDCEF’ to connect to the salesforce with username ‘new_user’ and password ‘pass@123’, executes the SOQL query ‘SELECT Id FROM Records’.
    Returns ‘Query result’ on executing the query.

To view all the Salesforce functions, click here.

Did you find what you were looking for?