Raw SOSL generated: searchResult.sosl returns null.
var params = arguments[0],
$ = skuid.$, queryText = 'abc';
// Perform our SOSL Search
$.when(skuid.sfdc.search({
query: queryText,
searching: “ALL FIELDS”,
returning: n
{ “objectName”: “Account”, “fields”: ,“Name”,“CreatedDate”] },
{ “objectName”: “Contact”, “fields”: m“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);
});