With the recent Release Wave updates in Power Apps Portal, we can include our custom entity in Global Search.
Let me guide you how to configure search for entities.
Step 1: Go to your Portal Management App->Site Settings and create the following settings as explained below:
1. Make sure the primary site setting named Search/Enabled is set to true
2. Create a site setting for additional entities named Search/EnableAdditionalEntities as shown in the screenshot
3. Open an existing site setting search/filters and include the value as per the description.
I kept <name 1>:<entity_logicalname> separated by ; <name 2>:<entity_logicalname> since it is a name/value pair
Step 2: Go to your Customizations and select your entity (my entity name is Custom Requests) and then Views.
Create a public view with your filter and columns. Save the view name as Portal Search like as shown
Save your changes and publish the entity.
Step 3: Go to Entity Permissions in your Portal Management App and create an entity permission for the entity with scope as Global and include Read privilege
Once permissions are created associate the required web role under Related. I have associated Authenticated Users which means my permission gets applied to the authenticated user when signed in to the portal.
Step 4: Create a Read Only Entity form which will be used to configure our search results web page.
Step 5: Go to your Portal and create a New Page and then select Blank Page as Template using the WYSIWYG Portal Editor
Under Components select the form component and add it to your page created in Step 5
Once the form is added choose your entity form created in step 4
Step 6: Go to Portal Management App and select Site Makers. Create new site maker with the following details
Name: cr6b0_customrequests_SearchResultPage
Page: Requests Page (created in step 5)
Name is in the format of <entitylogicalname>_SearchResultPage and make sure you choose the page as content page.
All our configurations are in place and refresh your portal cache to view the search results.
As you can see my entity is displayed included in Global Search engine
Now I go ahead query with my search text as shown below
My entity record details matching the search criteria gets displayed.
Hope this helps!
Debajit Dutta
(Business Solutions MVP)
For training and consulting, write to us at info@xrmforyou.com
Discover more from Debajit's Power Apps & Dynamics 365 Blog
Subscribe to get the latest posts sent to your email.