I have the following validation rule for a Custom Object:

AND(ISPICKVAL( transp__SFT_Trip__r.transp__SFT_Status__c, "Encerrada") , $Profile.Name != "Administrador do sistema")

It only let the admin user change this record when the field of the Trip Object is "Encerrada".

The problem is when another user (which is not the admin) updates the Trip status to "Encerrada" because the system also updates the Custom Object. It was working fine until days ago.

It seems that Salesforce has changed their logic for Validation Rules to get the new value of the field. I want this validation to get the old value of trip status and not the new one.

  • So, you are saying that it doesn't let them update trip status to Encerrada now and it used to? Did you make any other changes or add a Process Builder to the org that might be causing the update to the child object? Commented Feb 25, 2015 at 23:46
  • I don't think so. It has always updated the other object. The only thing that came up in my mind was Salesforce update. Commented Feb 26, 2015 at 11:41

2 Answers 2


For validation rules I would use "<>" and not "!="

ISPICKVAL( transp__SFT_Trip__r.transp__SFT_Status__c, "Encerrada") , 
$Profile.Name <> "Administrador do sistema"

Give that a shot!


If I understand it right, when the value in the picklist is Encerrada, only system admins should be able to update that record. You can add one more condition to check if that picklist value was not updated in the current transaction by a non admin.

AND( !ISCHANGED(transp__SFT_Trip__r.transp__SFT_Status__c), ISPICKVAL( transp__SFT_Trip__r.transp__SFT_Status__c, "Encerrada") , $Profile.Name <> "Administrador do sistema" )

  • That would work only if Salesforce allow to use ISCHANGED and PRIORVALUE functions with relationship's field, but it's not possible. Commented Feb 25, 2015 at 19:33

You must log in to answer this question.

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