sf_wsdlquery()

Read(119) Label: query, sql statement, case,

Description:

Query data and return query result.

Syntax:

sf_wsdlquery(sql)

Note:

The external library function queries data and returns query result. The cases used by involved fields should strictly conform to SObject Field defined in Salesforce at query. At present, the function supports simple user-defined SQL statements.

Parameters:

sql

A SQL statement; does not support select * from table. Users can refer to the value returned by sf_wsdlview() to write corresponding fields

Return value:
A table sequence

Example:

 

A

 

1

=sf_wsdlopen("user","pwd")

enterprise style connection

2

=sf_wsdlopen@p("user","pwd")

partner style connection

3

=sf_ wsdlquery (A1, "SELECT ContractId,AccountId,EndDate FROM Order")

 

4

=sf_wsdlquery(A1,"FIND{United Oil*}IN ALL FIELDS RETURNING Account(Id,Name,Type),Contact(Name,FirstName,Email),Opportunity(Name,StageName)")

 

5

=sf_wsdlquery(A2,"Select BillingState,Name,FIELDS(CUSTOM)From Account limit 10")

fields() function can be used under partner style connection

6

=sf_wsdlclose(A1)

 

7

=sf_wsdlclose(A2)