Aside from standard Account object, I have this custom object named Object1__c
. This custom object contains a field that references the Account object named Account__c
.
This is what I aim to achieve:
There must be an error message preventing the creation of Account record if Object1__c related list from Account record does not contain any records, and if Picklist__c
from Account object is equal to this value: Value1
.
I created a validation rule in Account object with this criteria:
AND(ISNULL($ObjectType.Account.Fields.Id),ISPICKVAL(Picklist__c,'Value1'))
There's no error when I check the syntax. But the problem is that it still saves the record when it's supposed not to be inserted to the database when the criteria above becomes true.