How to hide Supplier's contact and address to Sales User

Hi I noticed in ERPNext that all contacts and addresses are readable by all users. Is there any way to restrict sales user from seeing supplier contact and address?

I understand that I could set user permission one by one. But it is too specific and not efficient, is there any good way to restrict the permission?

Thankyou

Hmm :thinking:

I suggest a better approach for handling role permissions in this case. First, remove all permissions from the role related to contacts and addresses. Then, create a new role, like “Contact/Address,” and assign the appropriate permissions to it. If you need access to contacts and addresses, you should select the “Contact/Address” role. This way, users will only be able to see the contact and address information.

With this approach, the sales user/manager would not have the ability to see customer’s contact/address. While each user with the new role will be able to see the contact/adress list in its entirety

Is there any way to limit each user to certain group of contact/address?

Regards

Jevon

I’ve already explained that you need to work with the Role Permission Manager. Alternatively, you can create a new role based on the specific scenario and assign it to the user. It’s difficult to explain every detail here because only you will know at what level you need to manage permissions. You’ll need to practically do this locally to get a better understanding. Once you go through these steps, you’ll have a clearer idea of how it works.

From my understanding, setting permission with Role Permission Manager only allows the user to see all of the contact/address list or not at all.

ERPNext is using common contact/address doctype for both supplier and customer, hence when I give the permission to the sales user to read/write, they will be able to see the all contact and address including supplier’s contact and address, or when I do not, cannot see the contact/address at all (only able to see the reference in the customer doctype).

If I set it into “Only if creator”, Sales User cannot share common contacts/addresses with another Sales User.

Setting User permission one by one is not possible because of the large numbers of contact/address.

Is there any solution to this? to limit Purchase users to access only Supplier’s contact and addresses, and to limit Sales users to access only Customer’s contact and addresses.

Thank you for your help

Jevon

I too have the same concern. It can be filtered out by using Link document type and setting it to Customer. So you can hide the supplier related contacts.

But your question was to totally prevent sales user from accessing contact which are linked to Supplier.

I have found a solution by making a new doctype, Contact Category.
Making several categories of contact, make customization by linking the contact doctype to this new doctype, set each contact’s category, assigning the Document permission to specific user to what category they should be able to access.

Hi,
We also have the same concern and would like to implement the solution you mentioned. Can you please elaborate a bit more about the solution, enabling us to replicate the same in our system.
We’ll be thankful for your support and the solution may also help others to solve this very common and basic problem related to Business Operations…

Hi here are the steps I have taken:

  1. Create a custom doctype “Contact Category”
    Here I created a single Data field:

Here are several of Contact Category I created:

  1. Customize Contact by adding a link to the Contact Category as options.

I created a link field with Contact Category as options.

image

Also make “General” as default, so when a user create a new contact, it will be set automatically to General.

  1. Assign User to specific Contact Category in the User Permission

If needed you could add several of the user permission, so a user could see several categories, e.g. General, Internal, Customer.

All done

Best regards,
Jevon

1 Like

Just One More Thing, Why we cant use the link field available in Contact/Address Master to just control the user permissions??

as we already have a filed in the contact/address master doctype, can’t we use this field for permission restrictions based on user roles???

@jevht your idea is good i tried too. it was working.

But the point here is I already have 1000s of contacts of both customers and suppliers. How to change it. This even I can make filter to link document type “Supplier” having this filter bulk edit the contact category field.

But how does it automate in newly created contacts.

Hope as per @TRACKOMATIC_INDIA there should be a solution to make permission out of child tables or someother automation.