function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sean OldroydSean Oldroyd 

validation rule fires on an encrypted field and is throwing a Invalid (null).

Our sandboxes updated to Version: Summer '18 Patch 3.5 on 5/5/18.  Since the update an existing validation rule is causing failures when updating the record that the rule is associated with.  The rule fires on an encrypted field and is throwing a Invalid (null).  A previous known issue I found here is similar but it says it is fixed (https://success.salesforce.com/issues_view?id=a1p30000000jaT3AAI&title=validation-rule-occurring-with-invalid-null-when-org-has-encryption-enabled).  I also tried the work around in the known issue, however the rule still throws the error.
Best Answer chosen by Sean Oldroyd
Raphael FonrougeRaphael Fonrouge
We reproduced the same issue on custom objects.
The workaround (https://success.salesforce.com/issues_view?id=a1p30000000jaT3AAI&title=validation-rule-occurring-with-invalid-null-when-org-has-encryption-enabled) proposed by Salesforce (set the debug filters for 'Validation' to 'None') works when running Apex tests from the the developper console or when activating debug logs for a user. The remaining problem is that I don't know how to define these filters when running tests from my dev IDE...
 

All Answers

kevingwynnkevingwynn
This error is going to prevent us from being able to deploy. We are still waiting to hear back from Salesforce on an open ticket on this. Has anybody else experienced this?
Joseph VanWagoner 9Joseph VanWagoner 9
I have run into the same issue also. This needs to be addressed soon; so we do not miss our deployment window.

I have noticed that the validation rules seem to work when on the form, but not when using code.
Jim RichinsJim Richins
We have a number of encrypted fields.  This problem seems to only affect the field(s) on the Contact object.
 
Raphael FonrougeRaphael Fonrouge
We reproduced the same issue on custom objects.
The workaround (https://success.salesforce.com/issues_view?id=a1p30000000jaT3AAI&title=validation-rule-occurring-with-invalid-null-when-org-has-encryption-enabled) proposed by Salesforce (set the debug filters for 'Validation' to 'None') works when running Apex tests from the the developper console or when activating debug logs for a user. The remaining problem is that I don't know how to define these filters when running tests from my dev IDE...
 
This was selected as the best answer
Sean OldroydSean Oldroyd
@RaphaelFonrouge, thank you, the same workaround has worked successuflly for us.  There is also this Knonw Issue (In Review) that we can go and add to the affected by list.  This will also put you on the list to be notified when SF rolls a patch.

https://success.salesforce.com/issues_view?id=a1p3A000000nhJ0QAI
gta loversgta lovers
i want to implement this on my site too , these are my sites : https://cocmagic.app/ https://cocmagic.app/clash-of-clans-mod-apk/ https://theclashofmagic.com/