Provides the ability to add a custom view to a lookup control.


AddCustomView('controlname', 'entitylogicalname', 'nameofview', 'fetchxml', 'layoutxml', 'isdefault', 'viewid')


AddCustomView('preferredsystemuserid', 'systemuser', 'Only users in Canada BU', GetFetchXML('CanadaUsers'), GetLayoutXML('CanadaUsers'), false)


AddCustomView('primarycontactid', 'contact', 'Only contacts with names starting with A', GetFetchXML('A-Contacts'), GetLayoutXML('A-Contacts'), true, '{00000000-0000-0000-0000-000000000001}')


Name Type Description Required
controlname xxxx xxxx xxxx
entitylogicalname xxxx xxxx xxxx
nameofview xxxx xxxx xxxx
FetchXml xxxx xxxx xxxx
LayoutXml xxxx xxxx xxxx
isDefault xxxx xxxx xxxx


In Dynamics 365 v9 there is a bug that Microsoft does not respect the isdefault flag. So in this case you need to set a viewid guid at the end of the function call.

Microsoft APIs

This North52 function relates to the following Microsoft APIs:

Did you know?

North52's Decision Suite works across the Power Platform

The ultimate no-code decision suite for your Power Platform projects.

North52 Turbocharges Microsoft Dynamics 365 CDS, Dynamics Portals, Power Apps and Power Automate to help you deliver your projects faster and easier.