I have a recordtype "User" and it has column named : 'IsInternal' that decides if user is internal or external and its a Boolean field. On the basis of this column i want to find out if the loggedinuser is external or internal how can I achieve that? after knowing that if the user is internal or external i will enable and disable the filter list options which i am achieving through logic below:
a!recordFilterList( name: "User Email Domain", options: { a!recordFilterListOption( id: 1, name: "Internal", filter: a!queryFilter( field: User.isInternal, operator: "=", value: true() ) ), a!recordFilterListOption( id: 2, name: "External", filter: a!queryFilter( field: User.isInternal, operator: "=", value: false() ), ) }, defaultOption: "External", isVisible: true, allowMultipleSelections: true )
Discussion posts and replies are publicly visible
Hey,
Based on my interpretation, it seems you want to display the filter list options based on whether the loggedInuser is internal or external. To achieve this, you can query the user record using a filter that considers the loggedInuser, retrieving details such as the user's internal status (as a boolean value). Then, utilize the isVisible parameter in recordFilterList to incorporate the obtained response (true or false) for appropriate visibility settings.
Yes how can I filter the loggedinuser from recordtype?
You need to create a query record rule for the user record type, add filter based on the field where usernames are stored and get the details of that user.