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 - When parent obj field1 Status is Completed at that time child object should not allowed to create

Parent Object - AC - field1 Status picklist value 
Child Object Op - When Field1 is "Completed" it should not allowed to create OP record. 

David Zhu 🔥David Zhu 🔥
You may create a validation rule on child object assuming the field is a picklist data type.

ISPICKVAL(Parent__r.field1__c, 'Completed')
Kristiana GrangerKristiana Granger

I am trying create Validation rule on "Parent object" at that time how to pick value of child ? 

I should not create on child object, thats part of requirement

Kristiana GrangerKristiana Granger

on parent object (workorder) we have Status field - picklist (when status is Complete /cancel), at that time it should not allowed not create new Child object(service appointment) for that workorder


David Zhu 🔥David Zhu 🔥
If it is master detail relationship, create a count roll up summary field on parent object, add a validation rule check if the value if the roll up summary field changed if status is complete.