sf_query()

阅读(11) 标签: 查询数据, sql语句, 查询,

描述:
 
查询数据并返回结果值

语法:
  sf_query(url,params)

备注:

外部库函数,查询数据并返回结果。目前支持对象SObject查询,以及Apex接口、自定义简单的SQL语句查询。查询时,所用字段大小写需要严格遵守Salesforce定义的Sobject Field

参数:

url

/services为开头定义的服务域路径

params

url对应的参数

返回值:
序表

示例:

 

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)