Quick Tip – Restrict Customer Lookup to show only account or contact

In this blog we will see how we can restrict the customer lookup type field to show only account or contact without using “addPreSearch” method.

To restrict the customer lookup, we can use below method.

For more info:

https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/controls/setentitytypes

Example.

On Case entity, we have added below code on form load to restrict the customer lookup to show only account.

Hope this helps!!