0

I want to put SOSL QUERY on Pricebookentry object but its not working, its throwing 'Pricebookentry is not searchable'. Can someone help?

Code----

enter image description here

string searchStr = 'value';

String searchQuery = 'FIND \' *' + searchStr + '* \' IN ALL FIELDS RETURNING  Pricebookentry(Id, Name)';

system.debug('searchQuery '+searchQuery);

List<List <sObject>> searchList = search.query(searchQuery);

system.debug('searchList '+searchList);

enter image description here

1 Answer 1

1

The PricebookEntry does not support SOSL, It would include Search() in the below screenshot if it did. enter image description here

Taken from: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_pricebookentry.htm

Compare to the Account object: enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .