Hot answers tagged

26

You can not use text area fields in SOQL and SOSL filter criterias. Try this approach: List<Project__c> projects = new List<Project__c>(); for(Project__c proj : [SELECT Name, Status__c, Description__c FROM Project__c WHERE Name LIKE '%' + String.escapeSingleQuotes(name) +'%' + OR Status__c = String.escapeSingleQuotes(status)]) { if(proj....


9

There is an Idea to Allow filtering on Long Text Area, so you can't. In a pinch you could iterate over your results in a for loop and use String methods to filter out/in the desired results. Of course, that may not be reasonable depending on the number of records and whether or not what you are doing is needed in real time.


9

Search all files for a substring Windows Sublime: ctrl + shift + f Eclipse: ctrl + h Mac Sublime: ⌘ command + shift + f Eclipse: control + h Search for a file by name Windows Sublime: ctrl + p Eclipse: ctrl + shift + r Mac Sublime: ⌘ command + p Eclipse: ⌘ command + shift + r


9

Salesforce doesn't provide a lot of visibility into the inner workings and technologies underpinning their platform. The official engineering and developer relations blogs may provide some insight from time to time, but again, it's not too substantial. In the end, details like these are unimportant to end users like ourselves. Even if we knew which ...


7

I have just been playing with the tooling API and discovered that it would be possible to retrieve the global method names for Apex classes within a managed package. You could write a script that first queries all managed Apex classes (classes that have a namespace - there might be a better way to do this?): https://SALESFORCE_DOMAIN_HERE/services/data/...


7

As you know, Salesforce has different services and sites. For the Salesforce Platform, as mentioned by @Derek F, and the video he pointed out: Apache Solr (screenshot from the presentation below): For the H&T Portal, Salesforce uses a Coveo Index.


6

If you wanted to completely block out an object, dont create a tab for it, and it doesn't show up in the search. However, for all other cases, as long as the sharing settings permit the user to see the data, and if it matches the search expression, it will be returned in the results.


5

20,000 characters as of the Summer '13 release. https://na1.salesforce.com/help/doc/en/salesforce_app_limits_cheatsheet.pdf - page 37 The SOSL statement character limit is tied to the SOQL statement character limit defined for your organization. By default, SOQL and SOSL queries cannot exceed 20,000 characters.


5

I just discovered a work around for this here. Create a Formula field that uses the LEFT formula and filter on that. You cannot filter on the ENTIRE long text but you can filter on part of it: Legal_Street__c is a long text area. I created a formula field called StreetConc__c: LEFT(Legal_Street__c, 40) I then created a dummy record and put the text '...


5

If you are talking about searching for a class or page by name, then using ⌘ command + p for Mac. or ctrl + p on Windows will open a metadata search prompt where you can find project files very quickly. This is the only way I open files using Mavensmate and Atom.


5

The way to tell Google not to translate any specific items is to use the <span class="e;notranslate"e;> </span> tag for that particular element. This is documented here and there's an example for it here as well.


5

Does the object in the org missing search results have a tab created ? Search and tabs are connected, if you do not have a tab for the object/ the user does not have access to the tab the search results/ filters may not be available for the object. Finally Vote for this idea if you want this feature changed: https://success.salesforce.com/ideaView?id=...


5

First you need to tie down the meaning of the list of wrappers. My assumption (but ultimately its your choice as the designer/documentor of the API) is that you want only records where all 3 wrapper values match not where any permutation of the 3 wrapper values match. One way to do that is dynamic SOQL: String[] terms = new String[] {}; for (SearchWrapper ...


4

For Contacts below are the fields that are available for search: If you want to make any other field searchable, the work around is to mark that field as external Id.


4

Based on what @eyescream and @grigriforce has suggested and additional research I have done, it seems like this isn't possible out of any base functionality. The only way this is possible is through custom functionality written in Visualforce/Apex.


4

You need to activate a feature called Enhanced lookup. For that do the following steps: go to Setup -> Customize -> Search -> Search Settings Over there scroll down to the Lookup Settings and activate it for the wished custom object now you will be able to search in all searchable fields Here is some more official information about Enhanced Lookups.


4

I see that the code where you find actual accounts is not returned in wrapper format public pagereference Search() { String finalSearchValue = '%' + fullname + '%'; Accounts = [Select Id, Name, Active__c FROM Account where Name like :finalSearchValue]; wraplist = new list<wrapData>(); for(...


4

The map class has a convenient constructor that creates a map keyed by the id. That then makes lookup simple and quick: List<Contact> l = new List<Contact>(); ... Map<Id, Contact> m = new Map<Id, Contact>(l); ... for (...) { Id id = ...; Contact c = m.get(id); ... } However, if it is only one ID you want to find just ...


4

You have several problems here, so let's go over them. First, you're trying to use the same function to render the list (via a getter) and use it as an action function. You can't do this, it simply won't work. For that matter, you really should avoid querying in a getter, because it can have unintended side effects. So, starting from the beginning, you will ...


4

The easiest way to implement that kind of lookup in code is with a Map. Your code could look like this: public class ChainReactionUserClass { @future public static void ChainReactionStart(set<ID> recordIDs){ //Grab all required fields from user. Essetial to test class running. list<user> users = [SELECT ID, Firstname, ...


4

There's an existing implementation of this that you can use and save you much time in development: TypeAhead The OOB version handles Accounts: <c:Typeahead object="Account" />


4

Wildcards at the beginning of a search term are not supported. This can definitely cause you to get incorrect results, so don't do it. Wildcards at the end are acceptable, but will return more (less accurate) results than not adding it. If I were you, I'd just pass in the values verbatim. Also, since you're not actually doing dynamic searching, consider ...


4

You'll need to set-up the Search Layout Configuration options for the New Object in Lightning Setup, including the Lookup Dialogs and Search Filter Fields. See Configure Lookup Search Results in Lightning Experience for more details.


4

If you are trying to edit the values of the records from Search results, that is not possible. You can only edit the values by going to the record page. If you are looking to changing the columns, here is the way. Go to. Setup --> Object Manager --> Contact --> Search Layouts. Click on Edit of Search Results. There you can change the columns


4

The lookup window shows "recently viewed" records when there is no search text. This is a list pulled from the MRU (Most Recently Used) cache, which only stores about 200 records per object per user (which is why the Lookup window reads "Recently Viewed Contacts"). Even with a lookup filter, you are required to view those records and have them in the MRU ...


4

I use "Find in Path", in the context menu shown by right clicking on the root of the project in the project navigation pane. This does a string search in the whole project structure. If you want to use non-string searching, either open the SObject from the Offline Symbol Table (not the SObject's meta file) and use "Find Usages", or find an existing usage of ...


3

Have you used Eclipse or the Force.com Migration Tool before? To search data, you have SOSL and the global search widget. To search configuration, you can pull everything down with Eclipse or the Force.com Migration Tool. I try to stay as toolchain agnostic as possible. This ant script will dump all validation rules, email templates, custom objects etc ...


3

A good way to test this is to look at the generated debug SOQL at the bottom of the page and then run it in SOQL Xplorer or something. This will give you a good indication what is going on under the hood. For instance, when I entered 60 into the Amount field, the generated SOQL is: select name, accountid, amount, closedate, forecastcategoryname, ownerid ...


3

They should show up as Activities. Also, make sure you click the Search All button, the first time you execute a global search it tends to use a subset of the searchable objects.


3

Try to use the native javascript, it is easier in this case. And then just hide the element with a class name headerSearchContainer: <script> window.onload = function(){ document.getElementsByClassName('headerSearchContainer')[0].style.display = 'none'; }; </script>


Only top voted, non community-wiki answers of a minimum length are eligible