© Sanjaya Yapa  2019
Sanjaya YapaCustomizing Dynamics 365https://doi.org/10.1007/978-1-4842-4379-4_8

8. An Introduction to Dynamics 365 Portals

Sanjaya Yapa1 
(1)
Kandy, Sri Lanka
 

The primary purpose of a portal is to provide access to someone external or sometimes internal to the client’s organization. Why is this level of access required? Providing a Dynamics 365 license for the users outside of the organization is not economically viable, and operationally it is not required because some users might execute only a few actions such as opening a case, logging an online application, or registering for an event. In such situations, the portals provided as an add-on to Dynamics 365 for Customer Engagement are an ideal tool. There are many options when it comes to developing portals; the most versatile and recommended approach is to use the portal add-on provided with Dynamics 365.

You could use other content management systems to develop portals or even use ASP.NET MVC to develop a portal from scratch. But these strategies would require extensive development and experienced developers. The primary benefit of using the portals available for Dynamics 365 for Customer Engagement is that there is no hardware provisioning or maintenance. If your client has access to a Dynamics 365 Enterprise subscription, then you will have at least one portal license available.

Selecting the right fit for your client is up to you. In this chapter, we will be just scratching the surface of the portals feature for Dynamics 365 for Customer Engagement; we will provide references for additional reading because this particular area will not fit into a single chapter. The primary objective of this chapter is to give you a starting point.

Dynamics 365 Portals

First you need to configure the portal, which is a simple task. You must navigate to the Dynamics 365 Administration Center page and select the Applications tab. See Figure 8-1.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig1_HTML.jpg
Figure 8-1

Dynamics 365 Administration Center

Select Portal Add-On and click the Manage icon. You will be directed to the configuration page. You could also use the Power Platform admin center (which was announced in September 2018) to get to this point. The role of this new admin center is to consolidate all the administration tasks of the environments in one view rather navigating to several locations. As you can see in Figure 8-2, all the environments are listed on one page so the administrators can manage them easily. Please note that at the time of writing this book, the Power Platform admin center is in preview. Microsoft will continue to add new features, and ultimately this will become the go-to station for administrators. See Figure 8-3.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig2_HTML.jpg
Figure 8-2

New Power Platform admin center

../images/471991_1_En_8_Chapter/471991_1_En_8_Fig3_HTML.jpg
Figure 8-3

Portal configuration

Once you click Submit, it will take some time to complete the configuration. Once this process completes, click the URL, and it will commence provisioning of the portal. See Figure 8-4.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig4_HTML.jpg
Figure 8-4

Portal settings completed

When click the URL, you will be directed to the provisioning page, which indicates the process will take a while to complete. Once completed, the portal is created. For this demo, we have used the self-service portal. As per the SBMA requirements, members can log cases related to memberships using this portal. It is obvious that the amount of work that is required to get to this stage is minimal. After configuration, a fully functioning portal is created for you. It is that simple. See Figure 8-5.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig5_HTML.jpg
Figure 8-5

Web portal soon after configuration

The portals feature in Dynamics 365 comes with a web editor where you can easily modify the web pages. To modify a web page, you must log in with the user role who has the web admin role. At the point when you set up the portal, a System Administrator account will be created. In Dynamics 365 portals, an authenticated portal user is created and associated with either a contact or a system user. The default configuration is contact-based authentication. So, to log in to the portal, the contact must have the appropriate authentications granted. Except for unauthenticated users, portal users must be granted the appropriate web role. The latest authentication comes in two flavors.
  • Local authentication: This is the common forms-based authentication that uses the Dynamics 365 contact; to extend this, developers can use the ASP.NET Identity API.

  • External authentication: In this approach, account credentials and password management are handled by third-party identity providers.

Open the contact, and the users are created as contacts. You can assign web roles from the web roles page. Please note that when you setup Portals, a Dynamics 365 Portals app which is a Unified Interface Application and it will be istalled to MyApps section of Dynamics 365. See Figure 8-6.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig6_HTML.jpg
Figure 8-6

Assigning web roles

After you log in, just hover your cursor over the areas you want to modify, and the Edit option will be displayed. When you click the link, the WYSWYG editor for that section will open. See Figure 8-7.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig7_HTML.jpg
Figure 8-7

Classic editor

As you can see, the web editor is displayed on the right side of the page. There are a few functions that you can perform. When you click the Children button, you can see the list of child pages of this portal and the actions that can be performed on each page. See Figure 8-8.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig8_HTML.jpg
Figure 8-8

Editing child pages

Click the Edit button to open the page settings page where you can perform general editing. See Figure 8-9.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig9_HTML.png
Figure 8-9

Page settings

After completing the changes, you can save the changes by just clicking the Save button. You can even add more child pages from this editor. See Figure 8-10.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig10_HTML.jpg
Figure 8-10

Adding new child page, file, forum, and shortcut

On the “Create a new child” page, you can enter the details of the new page and save the changes, and a new child page will be created. See Figure 8-11.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig11_HTML.jpg
Figure 8-11

“Create a new child” page

When you navigate to the My Support page, the members will be directed to the Support query list. On this page, when the member clicks the Open a New Case button, they will be directed to the form to enter the case details and submit them, which will create an entry in Dynamics 365. See Figure 8-12.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig12_HTML.jpg
Figure 8-12

Support section

So far, we have discussed the classic web editor, but there is also a new editor available. For online instances, on the top of the browser, a message is displaying “A new and simplified content editor is available for portal customization.” Click the Try New Editor button, and you will be directed to the new web editor. See Figure 8-13.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig13_HTML.jpg
Figure 8-13

New support section

In the top-right corner there is a link to switch back to the classic editor, which was discussed at the beginning of this chapter. Many configuration and settings are available for further customizing the portal. These rich functionalities are available in the Portals menu. See Figure 8-14.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig14_HTML.jpg
Figure 8-14

Portals menu

When you navigate to a web site, all the configuration and settings related to the site are available; in the scenario in Figure 8-14, it is the customer’s self-service portal. For instance, the configuration details about the Home page can be found under the Root Pages section of the form. See Figure 8-15.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig15_HTML.jpg
Figure 8-15

Root Pages section

In the Child Pages section, all the child pages are listed, and you can edit and configure these child sites by navigating to them individually. All these settings are basically records in Dynamics 365 instance, and they are arranged hierarchically. When you open the Home page record, then you can see the list of child pages under the Child Pages tab. See Figure 8-16.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig16_HTML.jpg
Figure 8-16

Child Pages section

Many other configurations are available under each section, which makes the portal add-on more flexible and extensible. You can even define the permissions for the web site. Dynamics 365 portals have facilities to add custom JavaScript and CSS files as advanced portal customizations. See Figure 8-17.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig17_HTML.jpg
Figure 8-17

Other web site settings

We have just scratched the surface of the Dynamics 365 portals feature.

Customizing the Portal

In this section, you will learn how to further customize the portal experience for your external users using Dynamics 365 portals app. You also have the option to use the classic web interface, but this Unified Interface Portals app becoming the industry standard to customize the portals. See Figure 8-18.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig18_HTML.jpg
Figure 8-18

Dynamics 365 portal app in Unified Interface

As you can see from the navigation menu of the portal, we have few web pages here. Let’s add a new one for event registration. When the user navigates to this page, it should list all the current active events. On the app, navigate to Websites ➤ Child Pages and click + Add New Web Page on the grid toolbar. See Figure 8-19.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig19_HTML.jpg
Figure 8-19

Adding a new web page

On the next screen, you can enter the web page details such as the name, web site, parent page, page template, publishing state, and so on, as shown in Figure 8-20. All this metadata basically describes the structure and the location of the new web page.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig20_HTML.jpg
Figure 8-20

Web page details

As the next step, let’s add the newly created web page to the navigation. Log in to the portal as a web administrator so that you can edit the navigation. Click the Edit option for navigation, and you will be prompted with the options to edit the navigation. For more information about using web pages, visit https://docs.microsoft.com/en-us/dynamics365/customer-engagement/portals/add-webpage-render-list-records . See Figure 8-21.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig21_HTML.jpg
Figure 8-21

Navigation editor

Click the small green + icon on the menu to add the new link to the Event Registration page. As shown in Figure 8-22, your page will be listed in the Page drop-down of the “Add a new link” window.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig22_HTML.jpg
Figure 8-22

Adding a new link

After entering all the settings, click the Save button of this window, which will redirect you back to the Edit primary navigation menu, and click Save in the menu. The navigation to your page will be added. See Figure 8-23.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig23_HTML.jpg
Figure 8-23

New menu added to the navigation

As per the requirements, you must show the list of events in the system so that the members can select it for registration. Therefore, you must open the web page created and add an entity list, which will be bound to the view of the Events entity. When you click the Entity List search box, if the entity list is already created, you can search for it and select it or click + New to create a new one. See Figure 8-24.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig24_HTML.jpg
Figure 8-24

Adding a new entity list

Or, you could navigate to the entity list from the left navigation and create the new entity list. When creating the entity list, you must select the entity and the view you want to display to the client. In this scenario, it is the events entity and the Active Events view. See Figure 8-25.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig25_HTML.jpg
Figure 8-25

New entity list

You must also make sure you have configured the entity permission so that the user can see the data. To add permissions, you could open the entity permissions from the left navigation and create a new one by adding the required permissions, as shown in Figure 8-26. You can learn more about entity permissions at https://docs.microsoft.com/en-us/dynamics365/customer-engagement/portals/assign-entity-permissions .
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig26_HTML.jpg
Figure 8-26

Entity permissions

Once all these are set up, when you refresh the Events page, you can see the list of upcoming events. See Figure 8-27.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig27_HTML.jpg
Figure 8-27

Events list

To see the details of each event in a pop-up window, you can easily configure it. Navigate to Entity Form in the left navigation, click + New, and enter the settings, as shown in Figure 8-28.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig28_HTML.jpg
Figure 8-28

Event form

You can find more information about entity forms at https://docs.microsoft.com/en-us/dynamics365/customer-engagement/portals/entity-forms-custom-logic .

Now you must link this entity form to the entity list. Select the entity list from the left navigation, open the entity list, navigate to the Options tab, and scroll down to the Grid Configuration section. Click the + Details button, and specify the form to display when clicking the record on the grid. See Figure 8-29.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig29_HTML.jpg
Figure 8-29

Configuring the Event Details form

Now when you navigate to the Events page of the portal and click the event name, the event details will be displayed. See Figure 8-30.
../images/471991_1_En_8_Chapter/471991_1_En_8_Fig30_HTML.jpg
Figure 8-30

View Details window

Web Forms

When it comes to improving the user experience, web forms play a big role because they are designed to provide an intuitive end-user experience. Web forms support creating a step-by-step or wizard-like experience for data entry. Mainly power users can implement web forms without the intervention of developers. Web forms support both single and multiple steps with conditional logic. The following URL provides more details: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/portals/web-form-properties .

Liquid Templates

So far we have discussed how power users can extend the user experience without a developer’s expert knowledge. But there could be scenarios where you have to implement complex and custom business logic. This is not possible because the Dynamics 365 portal is a SaaS application and developers do not have access to its server-based source code. To overcome this barrier, Dynamics 365 portals use an open source template engine known as Liquid, which enables developers to create custom templates without needing to access the server-side source code.Liquid was created by Shopify using Ruby and was later ported to .NET under the DotLiquid project. For more information about the project, visit https://github.com/dotliquid/dotliquid . You can learn even more about Liquid from the Shopify documentation at http://shopify.github.io/liquid/ .

This section is just a starting point to Liquid templates; for more information, refer to https://docs.microsoft.com/en-us/dynamics365/customer-engagement/portals/custom-templates-dynamic-content .

Other Portal Technologies

As discussed, the purpose of developing a portal is to extend the capabilities of Dynamics 365 to external users. It is obvious that Dynamics 365 Portals is the best solution out there, but still there are other portal technologies available that can be connected with Dynamics 365.
  • As a traditional approach, you could develop a portal from scratch using ASP.NET MVC.

  • You could use a content management system such as Orchard to develop a portal.

  • Sitecore is another popular CMS that has a built-in Dynamics 365 connector.

All these approaches will require specialized knowledge, which is quite rare to find and might be expensive. Unless properly designed, these portals might cause maintenance overheads in the future. Therefore, it is always the best approach to use Dynamics 365 Portals.

Summary

In this chapter, you learned about the client portals available for Dynamics 365 for Customer Engagements. We specifically looked at configuring the portal add-on and some power user customizations. For advanced customizations, the chapter has introduced the Liquid templates. This was just an introduction Dynamics 365 Portals, and many references were given.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset