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
Niraj Singh 28Niraj Singh 28 

Duplicate record should not allowed in junction object

I am having a junction object named "Assignemnt" which is having Lookup relationship to two objects "Project" and "Consultant".
Here My requirement is that same project can not assgned to a consultant which is having for same as for example:-

Niraj PHP
Niraj .Net
Then Again not should be
Niraj PHP

Please guide me......
SandhyaSandhya (Salesforce Developers) 
Hi,

I would suggest you refer below linkl, which has the solution for the same.

https://salesforce.stackexchange.com/questions/12755/how-to-apply-uniqueness-on-junction-object/12756
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya
 
Sitanshu TripathiSitanshu Tripathi
Hi,
You can use the validation as per this link - 
https://www.sfdc4students.com/2018/01/validate-duplicate-record-using.html