Skip to end of metadata
Go to start of metadata

Cprime Apps has been rebranded as Anova Apps. Please note the only effect is the company name - all of our products’ names, logos, functionalities, support, etc. is exactly the same. The new location to our documentation space is https://anovaapps.atlassian.net.

Use the Salesforce Object Query Language (SOQL) to search your Salesforce data for specific information. 

Description

Returns all the results in a single response as a json string, or if needed, returns part of the results and an identifier used to retrieve the remaining results.


Is the equivalent of a Select SQL statement or the analog of the Jira JQL. This search enables you to get the list of information about Salesforce objects in a json format (not the value or object directly) which you can use to fill out fields in Jira using a script.

SOQL supports get functionality with attachments and statuses.

Syntax

sfdcQuery(sfdcConnection, soqlQuery, [sfdcAPIVersion])

Parameters

Parameter

Type

Required

Description

sfdcConnection

SFDCConnection

Yes

Salesforce Connection - it is the object resulted from the call to the connectToSalesforce routine.

sfdcQuerystringYesSOQL query, see more information in the Salesforce documentation.
sfdcAPIVersionstringNoSalesforce 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

JSON string

Example

The first part of the example will get the names of the accounts from Salesforce and the second part will get ID and names of the Salesforce opportunities.

SFDCConnection conn = connectToSalesforce("SFDC_test");
logPrint("WARN", "Connected to SF: " + conn.instance_url + " - " + conn.access_token);
 
string result = sfdcQuery(conn, "SELECT name from Account");
logPrint("WARN", "SOQL result: " + result);


string result2 = sfdcQuery(conn, "SELECT id, name from Opportunity");
logPrint("WARN", "SOQL result: " + result2); 

See also

There is no content with the specified labels