0

Does Salesforce SOSL works after enabling probabilistic encryption is enabled on the search field ?

1
  • Hi Everyone, Any more views on this .. I have enable probabilistic encryption on Account.name and i am able to get the results using SOSL ( not SOQL ) Query : FIND {"google*" } IN Name Fields RETURNING Account(name) Any comments ? Jan 28, 2019 at 6:42

2 Answers 2

1

No, it won't work because each bit of data is turned into a fully random ciphertext string every time it’s encrypted.

Also from Salesforce docs:

By default, Salesforce encrypts data using a probabilistic encryption scheme. Each bit of data is turned into a fully random ciphertext string every time it’s encrypted. Encryption doesn’t generally impact users who are authorized to view the data. The exceptions are when logic is executed in the database or when encrypted values are compared to a string or to each other. In these cases, because the data has been turned into random, patternless strings, filtering isn’t possible. For example, you might run a SOQL query in custom Apex code against the Contact object, where LastName = 'Smith'. If the LastName field is encrypted with probabilistic encryption, you can’t run the query.

For this we need Deterministic Encryption. How Deterministic Encryption Supports Filtering

1
  • thanks for the reply .. i have enable probabilistic encryption on Account.name and i am able to get the results using SOSL ( not SOQL ) FIND {"google*" } IN Name Fields RETURNING Account(name) . I was thinking that with probabilistic encryption, SOSL wont work Jan 24, 2019 at 7:28
0

NO. See the documentation here and here

Deterministic encryption is an option to allow filtering in SOQL, reports or list views against the data stored in our relational database, and there you only get exact match filtering.

1
  • When we enable Deterministic encryption we can do the search using SOSL instead of SOQL, something like FIND {"google*" } IN Name Fields RETURNING Account(name). Jan 24, 2019 at 6:33

You must log in to answer this question.

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