There seems to be a problem with Roles where listview is set to âOwnerâ.
Example: we have a role where Leads listview is set to Owner. When such a role is applied to a User and this user creates a Lead, or a Lead is assigned to this user, the User canât see this Lead. Moreover: the user canât see any Leads at all, even though multiple are assigned to this User.
When removing this role for the user, or when removing the listview=owner setting, the role seems to be working fine. For example, when I keep editing on owner-only, I can only edit those that are assigned to the user.
When setting the log to debug, I can see the following relevant Queries happening when opening Leads Listview:
Wed Mar 29 09:54:35 2017 [10088][17dcda44-64d2-827e-9eef-58db5f3dcbb9][DEBUG] Retrieve Lead : SELECT leads.*,leads_cstm.* FROM leads LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c WHERE leads.id = '[SELECT_ID_LIST]' AND leads.deleted=0
Wed Mar 29 09:54:35 2017 [10088][17dcda44-64d2-827e-9eef-58db5f3dcbb9][DEBUG] Limit Query:SELECT leads.*,leads_cstm.* FROM leads LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c WHERE leads.id = '[SELECT_ID_LIST]' AND leads.deleted=0 Start: 0 count: 1
Wed Mar 29 09:54:35 2017 [10088][17dcda44-64d2-827e-9eef-58db5f3dcbb9][INFO] Query:SELECT leads.*,leads_cstm.* FROM leads LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c WHERE leads.id = '[SELECT_ID_LIST]' AND leads.deleted=0 LIMIT 0,1
What strikes me, is the âWHERE leads.id = â[SELECT_ID_LIST]ââ. That looks to me like some variable isnât filled in properly.