Hot answers tagged


You can create a Unique field (Unique_Course_Student_Relationship__c) on the junction object and populate it with a concatenation of StudentId and CourseId through a workflow on create. CASESAFEID(StudentId) + CASESAFEID(CourseId) This will ensure that there's never two junction records with the same Student and Course as the value of that field needs to be ...


You can write a before trigger on the junction object and check if the combination already exists. If yes then use addError to throw an error.

Only top voted, non community-wiki answers of a minimum length are eligible