Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1633 Widoki

I am looking to create a filter that will let me reference the current logged-in user and show records that belong to them? 

Awatar
Odrzuć
Autor Najlepsza odpowiedź

This would depend on the model on which you are working, but the field to reference in such cases would be the " user_id". Please check if the user_id field exists in the model before creating the filter for the model.

As an example let's take the CRM app and create a filter that will display the opportunities that belong to the logged in user: 

So the filter will be created as follows: 

[("user_id", "=", uid)]

Where user_id is the Salesperson field on the opportunity and "uid" refers to the id of the logged in user. 

This filter will only show opportunities that belong to the logged-in salesperson. 

Similarly, if you have a user_id field in other models, we can create a similar filter referencing it. 

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
wrz 24
1228
1
wrz 24
1546
3
sie 25
7474
2
maj 25
4707
1
kwi 25
1778