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
GomerGomer 

Validation Rule - Need to Check Value of Related List Records

Hey All,

 

I'm very comfortable with validation rules check field values on the same record or on other records. I'm ok with using the Javascript code in the help text to create a button that selects

list view or related list records for a particular action.

 

However, I need to write a validation rule that checks the value of a field in all the records of a related list for that one record. 

 

Opportunity Products. How do I bring 'em all in and evaluate the field(checkbox) so I can determine if i want to allow the user to set the check box while adding a new product. Only 

one per Opp. That's the rule. 

 

Help!

 

-The Gomes

sfcksfck

Validation rules can't check related lists directly. You will need to write a trigger

GomerGomer

I figured I was going to have to write some code similar to what is in the help text 

for GETRECORDIDS. But what code?

Teach_me_howTeach_me_how

How to write javascript on helptext. can you show me example