0

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

  • 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 ? – Karuna Kumar Yatam Jan 28 at 6:42
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

  • 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 – Karuna Kumar Yatam Jan 24 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.

  • 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). – Karuna Kumar Yatam Jan 24 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.