Scenario.
Only the sales manager which has the location as a particular value has the permission to choose/change the sales order field value. The same role with any other location values are not permitted to change/choose the sales order field value.
Solution
In this scenario the sales manager do not have the permission to perform search/ access the employee data. We are restricting the functionality by using the client script. Hence it may result in the permission issue. Hence as a solution when the sales order page is loaded we have to store the location value with in a virtual field using a user event script.
We can use this value in the client script to check whether the location values is the needed one with the particular role. So we do not need to perform search inside the employee records with in the client script.