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
vivekanandanvivekanandan 

Custom look up filter based on roles for delegation purpose

In our scenario, we have users assigned to different roles. We have delegation of tasks to other users with the help of look up to users. But we want to restrict only for a particular user, such that that user should not be delegated to a particular user.

 

Eg: There are 3 roles; Role1, Role2, Role3

 

Here Role1 should not be a delegate to only Role2. In the look up , it should check for  the current user role and then check for that particular role.

 

Is this possible using lookup filter. Please advice me on this.

Best Answer chosen by Admin (Salesforce Developers) 
vivekanandanvivekanandan

Delegate for Deal Tasks :Role ID  = ID of the role

Current user:Role ID = (IDs of the role which will have access)

Delegate For Deal Tasks:Role ID  not = ID of the Role(mentioned in the first line)

 

Eg: Delegate for Deal Tasks: Role ID = 00E20000000k2id
Current User: Role ID = 00E20000000k6XX,00E20000000k2in,00E20000000k2iY,00E20000000k2is,00E20000000k2id
Delegate for Deal Tasks: Role ID not equl 00E20000000k2id

 

Used this in Filter setting  of  the Hierarchy relationship field solves the problem.

All Answers

T-HanT-Han

Vivek,

 

Check these links below -

https://na9.salesforce.com/help/doc/en/fields_lookup_filters_notes.htm  - Profile-Based Lookup Filters

 

https://na9.salesforce.com/help/doc/en/fields_lookup_filters_examples.htm - Profile in Lookup Filters

 

Lemme know.

vivekanandanvivekanandan

Thanks,

 

Anyways I got some idea in the look up filter itself.

T-HanT-Han

Could you share it..?

vivekanandanvivekanandan

Delegate for Deal Tasks :Role ID  = ID of the role

Current user:Role ID = (IDs of the role which will have access)

Delegate For Deal Tasks:Role ID  not = ID of the Role(mentioned in the first line)

 

Eg: Delegate for Deal Tasks: Role ID = 00E20000000k2id
Current User: Role ID = 00E20000000k6XX,00E20000000k2in,00E20000000k2iY,00E20000000k2is,00E20000000k2id
Delegate for Deal Tasks: Role ID not equl 00E20000000k2id

 

Used this in Filter setting  of  the Hierarchy relationship field solves the problem.

This was selected as the best answer