1

I am trying to execute a test class and getting this error : "Validation Errors While Saving Record(s)"

There's no explanatory text or anything else which can help me to resolve this issue. We have checked the concerned object and only change we could find is that for some fields encryption is changed - some fields of that object are encrypted now. My question is can change in field encryption lead to this error? And how can I resolve it?

1 Answer 1

0

At the time you asked this question Shield Deterministic Encryption was not available and you would have been using Shield Probablistic Encryption. So the answer is "yes" encrypting a field could lead to this error. Neither Apex nor Validation Rules can operate on certain types of probablistically encrypted data. Formulas can be used on it, which of course would be what you'd be using in a validation rule. From the Winter 19 documentation, formulas used in validation rules and other fields, are currently limited to the following operators & values:

BLANKVALUE, CASE, HYPERLINK, IF, IMAGE, ISBLANK, ISNULL, and NULLVALUE, as well as concatenation (&).

My recollection is there may have been fewer values available when this question was asked. For additional information on this subject, I recommend the following resource found in the Salesforce Security Guide: Strengthen Your Data's Security with Shield Platform Encryption.

You must log in to answer this question.

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