Restrict record creation with same Master record #inSalesforce

Restrict record creation with same Master record

Create a roll up summary field on the Parent object to get count the number of Child records. After that create a validation rule on the Child object like this -

AND (ISNEW(), Parent__r.rollupChildField__c > 0)

Error Message: More than one Child not allowed

Comments