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
Kristiana GrangerKristiana Granger 

Validation Rule - Child object

Can anyone guide me how to write Validation rule, When Field status is Complete / cancelled at that time child object should not allowed be created
David Zhu 🔥David Zhu 🔥
You may create a validation rule on child object assuming the field is a picklist data type.

AND( ISNEW(),
OR(
    ISPICKVAL(Parent__r.field1__c, 'Completed'),
    ISPICKVAL(Parent__r.field1__c, 'Canceled')
  )
)