FIND {삼정 물산*}
IN ALL Fields
RETURNING Account(ID, Name)
Wildcards
* | Asterisks match zero or more characters at the middle or end of your search term. For example, a search for john* finds items that start with john, such as, john, johnson, or johnny. A search for mi* meyers finds items with mike meyers or michael meyers. If you are searching for a literal asterisk in a word or phrase, then escape the asterisk (precede it with the \ character). |
? | Question marks match only one character in the middle or end of your search term. For example, a search for jo?n finds items with the term john or joan but not jon or johan. You can't use a ? in a lookup search. |
- The more focused your wildcard search, the faster the search results are returned, and the more likely the results will reflect your intention. For example, to search for all occurrences of the word prospect (or prospects, the plural form), it is more efficient to specify prospect* in the search string than to specify a less restrictive wildcard search (such as prosp*) that could return extraneous matches (such as prosperity).
- Tailor your searches to find all variations of a word. For example, to find property and properties, you would specify propert*.
- Punctuation is indexed. To find * or ? inside a phrase, you must enclose your search string in quotation marks and you must escape the special character. For example, "where are you\?" finds the phrase where are you?. The escape character (\) is required in order for this search to work correctly.
Operators
Combine multiple words with logic and grouping by using operators to form a more complex query. You can use the following special operators to focus your text search. Operator support is case-insensitive.
" " | Use quotation marks around search terms to find matches in the order you entered your search terms. A search for "monday meeting" finds items that contain monday meeting in that order.To include the words “and,” “or,” and “and not” in your search results, surround those words in double quotes. Otherwise they’re interpreted as the corresponding operators. |
AND | Finds items that match all the search terms. For example, john AND smith finds items with both the word john and the word smith. Usually if an operator isn't specified, AND is the default operator. When searching articles, documents, and solutions, AND must be specified because OR is the default operator. |
OR | Finds items with at least one of the search terms. For example, john OR smith finds items with either john or smith, or both words. |
AND NOT | Finds items that do not contain the search term. For example, john AND NOT smith finds items that have the word john but not the word smith. |
( ) | Use parentheses around search terms with logical operators to group search terms. For example, you can search for:
|
SearchQuery Character Limits
When you combine multiple operators in a search string, they're evaluated in this order:
- Parentheses
- AND and AND NOT (evaluated from right to left)
- OR
Reserved Characters
? & | ! { } [ ] ( ) ^ ~ * : \ " ' + -
Reserved characters, if specified in a text search, must be escaped (preceded by the backslash \ character) to be properly interpreted. An error occurs if you do not precede reserved characters with a backslash. This is true even if the SearchQuery is enclosed in double quotes.
For example, to search for the following text:
{1+1}:2
insert a backslash before each reserved character:
\{1\+1\}\:2
Example FIND Clauses
Single term examples | FIND {MyProspect}FIND {mylogin@mycompany.com} FIND {FIND} FIND {IN} FIND {RETURNING} FIND {LIMIT} |
Single phrase | FIND {John Smith} |
Term OR Term | FIND {MyProspect OR MyCompany} |
Term AND Term | FIND {MyProspect AND MyCompany} |
Term AND Phrase | FIND {MyProspect AND "John Smith"} |
Term OR Phrase | FIND {MyProspect OR "John Smith"} |
Complex query using AND/OR | FIND {MyProspect AND "John Smith" OR MyCompany}FIND {MyProspect AND ("John Smith" OR MyCompany)} |
Complex query using AND NOT | FIND {MyProspect AND NOT MyCompany} |
Wildcard search | FIND {My*} |
Escape sequences | FIND {Why not\?} |
Invalid or incomplete phrase (will not succeed) | FIND {"John Smith} |
FIND Clauses in Apex
- In Apex, the value of the FIND clause is demarcated with single quotes. For example:
FIND 'map*' IN ALL FIELDS RETURNING Account (Id, Name), Contact, Opportunity, Lead
Note
Apex that is running in system mode ignores field-level security while scanning for a match using IN ALL FIELDS.
- In the API, the value of the FIND clause is demarcated with braces. For example:
FIND {map*} IN ALL FIELDS RETURNING Account (Id, Name), Contact, Opportunity, Lead
'개발자정보' 카테고리의 다른 글
시스템이 작동하는 시간에서 고장이나 보수 등으로 사용하지 못한 시간을 제외한 전체 작동 시간을 계산하기 위한 오픈 전 테스트 (0) | 2022.03.13 |
---|---|
Salesforce Apex 트리거 시작하기 (0) | 2022.03.05 |
나의 Salesforce 성능 테스트 방법 (0) | 2022.02.13 |
Salesforce Instances 상태 확인하는 방법 (0) | 2022.02.13 |
나의 Salesforce 인스턴스 정보 찾기 (0) | 2022.02.13 |