I created a simple validation rule on the std Account sObject
AND(
NOT(ISBLANK(ParentId))
, billingCountry = Parent.billingCountry
)
This validation rule causes sql errors on CRUD operations on all account records
FIELD_CUSTOM_VALIDATION_EXCEPTION:Validation Formula "Parent_Same_Country" Invalid (ERROR: Raising ValidationException.No_Data_Available at yAccessUtils.sql(8c2f6c5):log_and_raise_exception_nc:255 [SDB::APP001]
Detail: <<null>>
Where: PL/sdb function happy.yaccessutils.log_and_raise_exception_nc(character varying,character varying,character varying,character varying,character varying,character varying,character varying,numeric,boolean) line 75 (SFSQL 255) during statement block exit
PL/sdb function happy.caccess.check_entity_access_ncu(happy.userinfo,happy.btsettingsinfo,character varying,numeric,character varying,character varying,boolean,boolean,boolean,boolean) line 1053 (SFSQL 3439) at PERFORM
PL/sdb function happy.caccess.check_entity_access_proc_ncu(happy.userinfo,happy.btsettingsinfo,character varying,numeric,character varying,character varying,boolean,boolean,boolean,boolean) line 8 (SFSQL 3039) at assignment
SQLException while executing plsql statement: {call cAccess.check_entity_access_proc_ncu(?,?,?,?,?,?,gUtil.gtypes_bool_to_boolean(?),gUtil.gtypes_bool_to_boolean(?),gUtil.gtypes_bool_to_boolean(?),gUtil.gtypes_bool_to_boolean(?))}(EXCLUDED, EXCLUDED, 0010o00002zJ2DR, EXCLUDED, true, false, true, false, true, true)
SQLState: S0001
Detail: <<null>>
Where: PL/sdb function happy.yaccessutils.log_and_raise_exception_nc(character varying,character varying,character varying,character varying,character varying,character varying,character varying,numeric,boolean) line 75 (SFSQL 255) during statement block exit
PL/sdb function happy.caccess.check_entity_access_ncu(happy.userinfo,happy.btsettingsinfo,character varying,numeric,character varying,character varying,boolean,boolean,boolean,boolean) line 1053 (SFSQL 3439) at PERFORM
PL/sdb function happy.caccess.check_entity_access_proc_ncu(happy.userinfo,happy.btsettingsinfo,character varying,numeric,character varying,character varying,boolean,boolean,boolean,boolean) line 8 (SFSQL 3039) at assignment
File: plsdb_exec.c, Routine: operatorRaise, Line: 12176
; [conn=STANDARD:1:1:3880419:1])
Error fields: ParentId
What am I doing wrong?