Restrict department wise user access on 'Material Request' doctype

Hello everyone,
I want to restrict user access on ‘Material Request’ department wise.
In material request I have a field name department that was linked with Department doc.
We know we can made a use employee and set a Department for that employee.
So when ‘It’ department is selected in a doctype then that doc should be visible only for which users those have the ‘It’ department on Employee. Same thing for others department.

hi

You can create a new User Permission

Select the user and “Allow” Department and in For Value… select the department you want. This will apply to all Doctypes.

1 Like

@centaur
Thank you so much. It works :grinning: