30
Views
1
Comments
Is it possible to always fetch only active users without using aggregate?
Application Type
Reactive
Service Studio Version
11.54.12 (Build 62475)
Platform Version
11.18.1 (Build 37828)

Hi Team,
Is it possible to always fetch only active users without using aggregate and without putting "User.Is_Active" flag?
If there are any environment level or platform level configurations present to achieve this. So that efforts of putting "User.Is_Active = True" filter at all places in the environment should be reduced in ideal way.
Also GetUserId() should return Id, only if user is active.


Regards,
Nagesh Soradge

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Nagesh,

If you need only active users, you need to filter in Is_Active, there are no views or the like that do this for you. This goes of course for most entities that contain a flag indicating a soft delete.

That said, don't filter on "User.Is_Active = True", but just on "User.Is_Active", as it's a boolean which doesn't need explicit compater with True.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.