Question:
When opening the Lookup field for the Assign_To_User_vod field on a Medical Inquiry record, the expected MSL User does not appear by default. The MSL User must be searched for to find. Why is this?
Answer:
There are several steps to the queries that run when selecting the Assign_To_User_vod Lookup field.
-
- The code will first query and search for the first 50 User records the logged-in User has access to:
SELECT Title,Department,Id,Name FROM User Where ( LastName like '%%' OR FirstName like '%%' Or Name like '%%' ) AND isActive = true Limit 50
- The code then queries Users who are aligned to the Account through the Account's assigned Territory or Territories. This query uses the AccountShare records that link the Account and its assigned Territories, and looks only for Users who are assigned directly to at least one Territory assigned to the Account.
NOTE: It is not enough for a User to simply have access to an Account by means of Sharing to show up in the MSL list. And the user must be assigned directly to one of the Territories on the Account - being assigned to a Parent Territory of one of the Account's Territories does not satisfy the requirements of this query. -
To help users select a specific MSL User to assign to a Medical Inquiry, Admins can configure the ENHANCED_LOOKUPS_vod Veeva Setting. By default, this value is 0, which filters MSL Users based on which users have access to the Account as in the previous step.
If this setting is set to 1, Admins can further filter the list of MSL users by user profile, role, or other custom fields.
- If the User fulfills the requirements of these queries, they will appear by default when selecting the Assign_To_User_vod Lookup field.
- The code will first query and search for the first 50 User records the logged-in User has access to:
Related Documentation:
Help Documentation: Medical Inquiry Fulfillment