function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
XactAndyXactAndy 

Validation rule question

Hi,

I have a custom object A, which has a lookup relationship to itself.

I want to write a validation rule that prevents the connection of one instance
of A to another instance of A if they have the same name.

The problem I'm having is that it doesn't seem possible to write a
validation rule expression that navigates across the relationship to get
the name of the other instance of A.

However, it does seem to be possible to navigate across relationships
between different custom objects, e.g. A related to B

Is this a known limitation of validation rules, or am I missing something?

Thanks,

Andy



cairlinncairlinn
I guess this is a limitation on the validation.
The contact object has a reports to item that is a lookup back into contact.
I was unable to select report to in the validation - although picking reports to as the actual contact is implicit within salesforce.

Maybe someone from the development group can verify if this is in fact the case and if so, then we can submit to the idea exchange.

Peter
KC-CRM AnalystKC-CRM Analyst

Andy,

I'm going to do some looking and see if I can't find you a way to do that.

 

Peter,

Could you tell me exactly what you want the rule to do or prevent so that I can look into this for you?

If you have already resolved these issues please let me know and inform me of the methods used.