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?
So you can set Only If Creator in Role Permission Manager.
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.
Actually, I’ve a list already available for the two doctypes Vendors and Employers
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
First, tell me that has an employee user?
No, I’ve created separate roles for them and currently they have access to vendors and employers doctypes only that I’ve mentioned in earlier post
if the vendor has not had a user then how can you set rights for employees.
In the same case if an employee has not had a user then how can you set rights for a vendor.
Otherwise, I think in your case first link with the user both doctype but i am not sure how to work both side role permission.
Hope you can try the best level.
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.
This should be solved with user permissions:
Once you’ve defined a relationship between the vendor and employee (using a link field), you should be able to apply permissions on top of it.