Salesforce Fact #75 | % in SOQL

We use escape character(\) in SOQL to handle special characters in query. If we need to check for the % sign itself in the query, we need to specify the same along with escape character.

In this example, we are fetching the account records which have two consecutive % symbol anywhere in the Name field. So we need to escape each of the % symbol which are to be considered as part of the text.

Attached are the screenshots.



.

Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow