I am working on a validation rule where Current user cannot be Record creator /Con Owner. Here I am storing current user in a field called requester and it should no be same as either the record(referring to the object gc in which I am creating the validation) creator or the con owner. Here in gc I have given con as a master detail field.
My validation rule:
OR (Requester__c = Con__r.OwnerId,
Requester__c= $User.Id)
Gave record creator as $User.Id
Is it the right way?
CreatedBy.Id
orCreatedbyid
.$User.Id
will give you the current user id who is editing itAND(NOT(ISBLANK(Requester__c)),NOT(ISBLANK(Requested_by__c)), OR (Requester__c = Con__r.OwnerId, Requester__c= $Requested_by.Id) )