User Review( votes)
Requirement: To filter a Lookup field options dependent on the record ownership for Lookup entity as the current user or his/her teams.
Description: The lookup field should be filtered based on lookup entities record owned by the current user or his/her teams.
This was achieved by adding Pre-filter to the lookup field as below:
// Filter the fetchxml ownership
fetchXml = “<filter type=’and’><condition attribute=’ownerid’ operator=’eq-useroruserteams’/></filter>”;
// Apply the filter to the field
Note: Applies to CRM 2013 and up.
Hope it helps and Happy CRMing!