+ Start a Discussion
Arvind1Arvind1 

Accessing Current User value in view criteria

Hi All,

 

In the Case object I have a field called Case Assignee. This is a field lookup to User. 

 

Following is my requirement:

 

I want to create a view with the criteria as Case Owner is the Current logged in user  and Case Assignee is not the current logged in user.

 

I am not able to identify how do I give this condition in the criteria.

 

Any suggestion on this will be helpful.

 

Thanks

Arvind

Best Answer chosen by Admin (Salesforce Developers) 
Arvind1Arvind1

Hi Rajesh,

 

Thanks for the reply. The logic worked.

 

Thanks

Arvind

All Answers

Rajesh ShahRajesh Shah

Create a formula field on Case with the following type of formula

if( $User.Id =  CreatedById , 1, 0)

 

I have used createById but you can use any User lookup field. Then use this field in the filter condition. Basically, formula field values are not stored in the database so based on the current user, it will show the appropriate value and hence can be used in the filter condition.

Message Edited by Rajesh Shah on 07-30-2009 07:08 PM
Arvind1Arvind1

Hi Rajesh,

 

Thanks for the reply. The logic worked.

 

Thanks

Arvind

This was selected as the best answer
Pal2011Pal2011

Hi,

 

Can you please tell me which condition did you put in to your view settings to make it work.

 

Thanks.