In Entity Lists Part A, we covered the beginning of Entity Lists all the way to filter conditions. In this blog we will cover these three main areas:
- Grid Configuration
Does anyone remember file cabinets anymore? I mean lots and lots of them containing tens of thousands of files. Oh sure, it wasn’t that bad to find a file that was indexed by last name and then first name, but it was still somewhat painful if you were attempting to find a file with the last name of “Smith” or “Johnson.” But what if you had to find all files where individuals lived in a certain city? Oh my! Get yourself a very large cup of coffee because we’re staying up all night.
Entity lists provide a great search feature that allows a Portal User to search on records – across columns of data. It can quickly narrow a list of 50,000 records to 1,000; it is very similar to the quick find of Dynamics 365 views.
Contact list before search is enabled:
To enable the search for your Dynamics 365 Portal list, log into your Dynamics 365 and navigate to your desired Entity List and scroll down to the Search section.
Check Enabled, enter appropriate Placeholder Text and helpful Tooltip Text if needed.
Contact list after search is enabled:
Default Tooltip Text (When you leave it blank on the Entity List record):
You can search by Name:
You can search by email address:
When searching, don’t forget to use the * (asterisk) as it helps with your results.
No results when searching by a partial Company Name:
Results when searching by Company Name with the asterisk:
You can search by phone number:
One item of particular importance is that we cannot search by parent fields. For example, in the image below, we received no results when searching on the Contact’s Account city.
You can quickly identify these columns, as the column headers are not links.
With the help of an AJAX Web Template call (future blog named Portals in Dynamics 365 | AJAXing your Web Template), you can do quite a few things like display the number of related records (Activities) for each Contact or retrieve other Dynamics 365 data. Always consider the performance impact.
Today, we are going to point the Portal User to a Google Map from the combination of city and state/province values. To get started, fire up the Developer Tools for the Portal page that contains the Entity List. Right click the first city value (Seattle) and choose Inspect Element.
We need to grab the data-attribute of both the city and state.
The code is finding the city element (<td>), and from there finding the parent element (<tr>) so it can find all needed elements. It then grabs the city and state/province values and plugs them into a Google Map link.
Now the city column is a link:
That link points to a Google Map:
You could make this much more complex, but I wanted to show some possibilities for illustration purposes.
Grid Configuration is a set of tools that adds functionality to your Entity List.
View of Grid Configuration on the Entity List:
In many ways, it is a replication of the Dynamics 365 navigation for a record.
With Create, you can point to an Entity Form, Web Page, or a URL.
Create your Entity Form that associates to the desired entity type. Here is a Contact Entity Form pointing to Contact Entity and Contact – Short Form.
Back on the Entity List in the Grid Configuration, click ‘Create’ and the below information and Save.
Target Type = Entity Form
Entity Form = Newly created Entity Form
Button Label = Whatever you choose
Refresh the Portal page and view the new create button.
Because we pointed the Entity List to an Entity Form, a modal form appears when the New Contact button is clicked.
If we want to point the Portal User to a separate web page, we would need to create a Web Page that points to the Entity Form. Then we change the Entity List Grid Configuration Target Type to Web Page and select the correct Web Page.
If we want to point the Portal User to an URL on the Portal website, we can do that as well.
With Download, you can allow the Portal User to download the Entity List results into an Excel spreadsheet.
Navigate to the Grid Configuration section on the Entity List form and click ‘+Download’.
A new Download section will appear. Enter a label.
Refresh the Dynamics 365 Portal Entity List page and view the new Download Results button.
File downloaded to local computer:
I will not cover all options for Item Actions but wanted to cover a few so you get an idea of how they operate. As the name implies, it is an action taken against the selected record in Dynamics 365.
When you want Portal Users to view detailed information on a record but prevent them from making any changes, you can use the Details Item Actions.
Create a new Details Item Action and fill in the necessary data:
In order for this to work correctly, the Entity Form Mode needs to be set to Read-Only and Record Source Type to Query String with “id” as the parameter name.
After refreshing the Entity List Portal page, you will see a drop-down option for each row.
Upon clicking the Details action, a portal read-only modal will appear.
Edit is very similar to Details but would normally be pointed to an Entity Form that is set to Edit.
From the Portal Entity List web page, Portal Users have the ability to fire a Dynamics 365 workflow. This action could be used to send an email notification to a Dynamics 365 User or request that record to move to the next stage in some processing.
Override Column Attributes
The last topic to cover for Grid Configuration is the mechanism to override the default column names. Many times, the column names just don’t make sense to Portal Users for your organization. For example, a particular Entity List is only listing schools, so “Company” doesn’t cut it. We can change that.
Default Entity List column names:
Navigate to the Dynamics 365 Entity List record and scroll down to the Override Column Attributes section under the Grid Configuration section. Click ‘+Column’, find the desired Attribute, and provide a different column name. Click Save.
Entity List with changed column names:
We are now at the end of our 2nd section for Entity Lists within the Dynamics 365 Portal series. The last section for Entity Lists will cover the Metadata Filter, Map View, Calendar View, and OData Feed.
If you have any questions about Portals in Dynamics 365, please reach out to us.
Dynamics 365 CE (CRM) How-To eGuide
41 pages of step-by-step instructions for 6 different key tasks in Dynamics 365 Customer Engagement (CRM). Includes interactions with PowerApps and Flow!Get the eGuide