0

I want to create a new View for custom object using Created By field as a filter criteria, my requirement is that i want to filter the records where created by should be same as logged in user.

(Basically want to filter the record by logged in user)

"My Records" Criteria is not working any how, Please suggest

Thanks in advance.

2 Answers 2

2

We can only create a view by filtering records by record owner.

But for your requirement you need to create a new custom field of formula type. values of that custom field are:-

  • Field Name: CurrentUserRecord

  • Datatype: Formula

  • Return Type: Number, 0 decimals

  • Formula: IF(CreatedById = $User.Id , 1, 0)

Now just add a simple filter in your new view:

  • Field: CurrentUserRecord [equals] 1
1
  • Thanks for solution, but as of now, i had created one new visual force page and controller extension get all the records and applied filter on the basis of logged in user by checking CreatedById=userInfo.getUserId(). Commented Jan 16, 2015 at 10:19
0

"My record" is records owned by the person and not logged in. So it wont work. Also Global variable like $User cannot be used either. I think its not possible

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .