Nforce nodejs salesforce搜索无法正常工作

时间:2016-06-22 11:12:11

标签: node.js salesforce soql

我跟着nforce link搜索了这样的对象

var selectQuery = "SELECT Name FROM Account Name = 'Spiffy Cleaners'";
org.query({ query: selectQuery, oauth: oauth}, function(err, resp){
  if(err) {
    console.log(err);
  }
});

我一直收到以下错误:

unexpected token: =]


errorCode: 'MALFORMED_QUERY',
  body: 
   [ { message: '\nSELECT Name FROM Account Name = \'Spiffy Cleaners\'\n                             ^\nERROR at Row:1:Column:30\nunexpected token: =',
       errorCode: 'MALFORMED_QUERY' } ],
  statusCode: 400 }

感谢。

1 个答案:

答案 0 :(得分:0)

您缺少WHERE声明:

SELECT Name FROM Account WHERE Name = 'Spiffy Cleaners'