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
studzeystudzey 

Validation Rule Question

Hi guys, 

Here is the scenario, and sorry if it doesnt make complete sense......I find it hard to explain: 

I have 4 objects. Object B is a child of A (Master Detail). Object C and D are children of B (also Master Detail)

So it looks something like this: 


                                                                               A
                                                                                 
                                                                               B

                                                                       C             D


Now, I want to have a tickbox in A , which once ticked, will block editing and creation of new entries in B and C, BUT, not D.

How is this possible?

Is there another way that I must take the problem? My implementation thus far was to creat validation rules in B and C. Once I set a validation rule in C only, it will allow for creation of B entries, and once I set a validation rule in B, it will block creation of D. 

Appreciate the help! 

Stadler

 

Best Answer chosen by Admin (Salesforce Developers) 
Navatar_DbSupNavatar_DbSup

Hi,

 

Try the below validation rule in object B

 

IF(Object_A__r.Tick_Box__c, true, false)

 

Make a validation Rule on Object C

 

IF(Object_B__r.Object_A__r.t_new__Tick_Box__c , true, false)

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

All Answers

Navatar_DbSupNavatar_DbSup

Hi,

 

Try the below validation rule in object B

 

IF(Object_A__r.Tick_Box__c, true, false)

 

Make a validation Rule on Object C

 

IF(Object_B__r.Object_A__r.t_new__Tick_Box__c , true, false)

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

This was selected as the best answer
studzeystudzey

Thanks man, its working I think