I am trying to create a validation rule that prevents a lookup field from being updated/changed when a checkbox on the referenced lookup record is true. I tried to reference the field using the _r but it didn't work.
I then tried using a formula field SIM_Card_2_calc__c and it doesn't work. The lookup field is SIM_Card_2__c. I want the rule to trigger only when the formula field is False. When it is true, I want the users to be able to change the field or make it blank.
AND(
RecordType.DeveloperName = "POS",
ISPICKVAL(Status , 'Consumed') ,
SIM_required__c = TRUE,
SIM_Card_2_calc__c = FALSE,
NOT(ISBLANK(PRIORVALUE(SIM_Card_2__c ))),
ISCHANGED(SIM_Card_2__c ),
NOT(ISNEW())
)