I’ve created 2 doctypes of vendors and employers and some of the vendors are connected to some employers and vice versa. So when the vendor opens the employers doctype then he can only able to see the employers that are connected to him and the same in the case of employers. When they open vendors doctype then they can only able to see vendors that are connected to them.
So how can I manage the relationship between them and achieve the above requirement?
Please set a particular role to define in the user and then checked.
If user-A creates a new vendor then will be only the user-A-created vendor show only and the same as in the employee case.
and I want to add a relationship between them so when a vendor-01 is related to Employer-01 and Employer-02 then he can only be able to see Employer-01 & 02, not the third one.
Both vendors and employers are created by admin so I think assigning role permission that you have suggested will not work
Both are the user itself and are linked with both vendor and employers doctypes and I’ve also given permission to read doctypes to them.
The thing is vendor can see all the employers and employers can see all the vendors. So I just have to restrict them to see only those who are linked to them. That’s why I have to find out how to implement relation between them and put a condition in a listview to restrict them.