Skip to main content

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);

});







Hi is skuid.sfdc.search API still supported in 11.2.9? The above example from Skuid documentation no longer works. Can you please advise?


Hi Jili


Can you perhaps explain your use case here please?


The Search component is quite powerful and I have created a page for you that has similar functionality.

























































































































    </javascript>
<css/>
<actionsequences uniqueid="sk-1YUp-247"/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>

Thanks! Yes we’ve had similar implementations. Our use case is to allow free text to be selected as a value if no company is found. We do not want to force create an account record in the system for previous work experience for instance.


Reply