Difference between revisions of "Limit Access to Business Partners using Logged-in User"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
 
Line 4: Line 4:
 
Outside Sales Rep (AD_Role_ID=1000009)
 
Outside Sales Rep (AD_Role_ID=1000009)
  
**Log into System as SuperUser
+
*Log into System as SuperUser
 
**Open Window Tab and Field and search for the window: Business Partner
 
**Open Window Tab and Field and search for the window: Business Partner
 
**Click on tab
 
**Click on tab
Line 16: Line 16:
  
  
 
+
[[Category:Developer documentation]]
Categories
+
[[Category:Training materials]]
Keywords: User level record lock,
+
[[Category:HowTo]]

Revision as of 17:25, 28 October 2009

The goal here is to ensure that when outside (Remote) sales representatives log into the system, they can only see their own Business Partners (Their own Business Partners will be defined by the Sales Representative Field on the Customer tab of the Business Partner). Other users logged into the system should see all customers.

Role: Outside Sales Rep (AD_Role_ID=1000009)

  • Log into System as SuperUser
    • Open Window Tab and Field and search for the window: Business Partner
    • Click on tab
    • Choose Business Partner
    • Put the following in SQL WHERE clause:

C_BPartner.SalesRep_ID = @#AD_User_ID@ OR @#AD_Role_ID@ != '1000009'

If you now log in as someone using Outside Sales Rep role, you should only have access to business partners with that users name on the customer tab. Problem: This seems to break Searches: Search queries that should result in 0 results still show all Customers belonging to the Sales Rep.