skuid.sfdc.search seems to be broken in skuid version 11.2.7. The following code from skuid documentation (https://docs.skuid.com/latest/en/skuid/api/skuid_sfdc.html#skuid.service.search) does not seem to work anymore.
var $ = skuid.$;
var queryText = ‘skuid’;
// Perform our SOSL Search
$.when(skuid.sfdc.search({
query: queryText,
searching: “ALL FIELDS”,
returning: u
{ “objectName”: “Account”, “fields”: t“Name”,“CreatedDate”] },
{ “objectName”: “Contact”, “fields”: c“FirstName”,“LastName”,“CreatedDate”] }
]
})).done(function(searchResult){
$.each(searchResult.results,function(i,sobjectResult){
var objectName = sobjectResult.objectName;
var records = sobjectResult.records;
console.log(‘* Found ’ + records.length + ’ ’ + objectName + ’ records’);
$.each(records,function(j,record){
if (objectName===‘Contact’) {
console.log('Found Contact: ’ + record.FirstName + ’ ’ + record.LastName);
}
else console.log('Found Account: ’ + record.Name);
});
});
}).fail(function(searchResult){
console.error('Search failed: ’ + searchResult.error);
}).always(function(searchResult){
console.log('Raw SOSL generated: ’ + searchResult.sosl);
console.log(‘Original search request’);
console.log(searchResult.request);
});```