The Dynamics 365 CE Portal is great way to extend Dynamics 365 functionality to external users and build powerful web applications. However, through configuration it still lacks some basic features that internal Dynamics 365 users are used to. One example of this is the ability to drill down on lookup fields.
If we were to look at an Invoice record directly in Dynamics 365 and we wanted to navigate to see the details of the customer record, we would just need to click on the customer name and the Account screen would appear.
This is basic functionality that has been part of CRM since version 1.0.
On the portal, if we surface the same form on an entity form page, we could change the value but we are not able to drill down and see the details of that account.
Note, we could add a “Quick View” form to the Invoice form as a way to see the details. However, there might be instances where we want to completely navigate to that particular record on the portal.
This seems like a pretty simple feature that ideally should be part of the Portal solution.
The following is a method where we will add a drill down link to the page and wire it to navigate to a page that will display the parent customer details.
The first step is to choose or create a Dynamics 365 form to use as a basis for a portal entity form. The next step is to create a Entity Form record that will be used to show the Account details.
We would need to make sure that the Record Source Type is “Query String” and we should note the value of the Record ID Query String Parameter Name (default is “Id”)
The next step is to create a corresponding web page where the entity form will be displayed. You can create this from either within Dynamics 365 or from the front side editing tools of the Portal. You will need to make sure you choose the Entity Form you created earlier. For a parent page, choose the page from which you will be navigating from (e.g. Invoice Details)
We also should make sure that the web page is not part of site map or it will add a “unusable” link on the Invoice Details page.
In order to not to have to hard code the link on the Invoice Details page, we will add a Site Marker record as a reference to the Account Details web page.
Now that we have the Account Details web page setup, we will need to create the link on the Invoice Details page.
Here we will use a combination of Liquid and HTML. Either navigate to the Invoice Detail page with a portal administrator account or via Dynamics 365* and add the following code to the Invoice Details Web Page record:
*I prefer to edit web page code using front side editing to avoid the cursor jumping around with the Dynamics 365 autosave feature.
We are using Liquid to assign the currently displayed invoice as a Liquid object. We then retrieve the Site Marker setting (using a site marker means we don’t have to hard code the URL).
Finally we build the URL by combining the Site Marker, adding the parameter (Id) and the GUID of the Account from the Liquid Invoice object. We also use Liquid to display the name in the Hyperlink text.
The result is now we have a drill down field on the Invoice Detail record on the Portal:
Clicking on the link we now can navigate to the Account record.
Using some Liquid, HTML and a bit of creativity we can easily extend the Dynamics 365 Portal further and build powerful externally facing web applications.
I hope you will find this example helpful in your Dynamics 365 Portal Projects!
I mentioned last week that I will be at Extreme365 in Long Beach. I will be participating in the following sessions:
Monday, November 6, 2017 – Extreme365 App Innovation Challenge
Wednesday, November 8, 2017 – Ask the Experts
Thursday, November 9, 2017 – Planning your Dynamics 365 Onprem to Cloud Migration
If you happen to be a Extreme365, please say hi!
Non-CRM or Technology related Appearances
I will also be competing on Friday, November 17, 2017 at the Ontario Powerlifting Championships
It was a big achievement to be able to qualify for both provincials and nationals last June. I started Powerlifting 5 years ago and my goal was to be able to qualify to compete nationally. Now its onward to the next step in my lifting career. First Provincials and then Nationals in Calgary in March.
Nick Doelman is a Microsoft Business Solutions MVP and will be looking for a spotter for the gym while in California. Any volunteers?