function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
B VenkatB Venkat 

Can you please help me out It's seems urgent?

Hi All,

I have Location__c object. It is lookup to User object(3 lookups to user), I have 20 users.

Locations Records(A,B,C,D,E,F,G)

User1 belongs to B,C location
User2 belongs to A location
User3 belongs to D,E Location etc.

I have Student__c object. It is lookup to Location__c.

Requirement is

When User1 enters Student Details he has to see only B,C locations When he clicks on Lookup icon of Students locations. How can i achieve.

Thanks,
Venkat
Balaji Chowdary GarapatiBalaji Chowdary Garapati
@Venkat,

  You can use look up filter to filter the locations out! For that do :
Go to the student Object Field List> Edit The Location Lookup Filed> Add lookup filter.,
In the filter select the condition as
CurrentUser: user.Id  -- euquals --  Field --  Location:user lookup 1 :user.id

and add all other filters too., as you said user could be associated to a location using any of 3 look up fields.

Then add filter logic as 1 or 2 or 3., Once you save it, and next time if any one click on location lookup from student object, they will have records displayed based on this logic.

Hope it helps

Thanks,
balaji