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
Kunal Purohit 4Kunal Purohit 4 

How to write Validation rule for given scenario?

Hello FOlks,
In my org there is one Object named Adverse Event/Product Complaint. It is having self lookup relationship named Parent Adverse Event/Product Complaint.
There are 2 record types. AE and PC,
Requirement is like,
If parent (original) record is AE:
Child (follow-up) record cannot be PC only
Child record can only be AE or AE/PC combo
If parent (original) record is PC:
Child (follow-up) record cannot be AE only
Child record can only be PC or AE/PC combo.


How to write Validation Rule for this?

SubratSubrat (Salesforce Developers) 
Hello Kunal ,

Requesting you to go through these documentation and video tutorial for your understanding .

https://www.youtube.com/watch?v=vjpNXeX95n4

https:/trailhead.salesforce.com/content/learn/modules/point_click_business_logic/validation_rules


http://​​​​​​​https://www.salesforceben.com/validation-rules-in-salesforce/ (http://https://www.salesforceben.com/validation-rules-in-salesforce/)


Hope it helps !
Thank you.