Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Description

...

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

Description

Excerpt

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 later you will be able to can use to fill out fields in Jira , by means of a script.Directly you can get / create / update data about Account and Opportunity. 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.

Code Block
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

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "sfdc_routines"
labelsbasic_routines