sf_query()

Read(4072) Label: sql statement, query,

Description:
Query data and return result.

Syntax:
sf_query
(url,params)

Note:

The external library function (See External Library Guide) queries data and return result. It supports querying SObject, through Apex interface and with user-defined SQL statements. The cases used by involved fields should strictly conform to SObject Field defined in Salesforce at query.

Parameter:

url

The service domain path preceded by /services

params

The parameter corresponding to url

Return value:
A table sequence

Example:

 

A

 

1

=sf_open()

 

2

=sf_query(A1, "/services/data/v51.0/query", "Select Id,CaseNumber,Subject From Case where Status='New'")

 

3

=sf_query(A1, "/services/data/v51.0/query", "Select Id,Name,(Select subject,ActivityType from ActivityHistories)from Account where Name like 'U%'")

 

4

=sf_query(A1, "/services/apexrest/Cases", "5005g000004TZQkAAO")

 

5

=sf_query(A1, "/services/apexrest/account/getGoodsByIdOrGoodsList")

 

6

=sf_close(A1)