Support Portal ContactGet in touch

Designing and Developing Microsoft Power Apps Portals

   Words by CRM Consultancy

   on 13/10/2020 11:56:00

microsoft-powerapps-logo

I have recently been working on a number of projects using PowerApps Portals. PowerApps Portals are a brilliant way of essentially setting up a little window into your CRM database to people outside your organisation. Portals give you the ability to give external contacts a real-time view into any records you want to share. This can be really useful if you want to keep your clients update on the progress of their cases, or allow them to update details about themselves directly in CRM, rather than having to have regular emails back and forth with updates.

It’s an extremely powerful tool, and with enough know-how and patience you can make use of a lot of different great functionality. However I’ve also found it to be a bit of a labyrinth at times. I won’t tell you how many hours I’ve spent flicking between the Portal Management App and the Portal Editor or clearing the cache, but I did want to share some of my notes I’ve made along the way to hopefully untangle the web a little bit (in my own head at least!)

1. Web Roles


When thinking about setting up a portal, one thing you need to be airtight on is security access. You can set up many different types of access for different users in one portal, and define these using web roles.

These are like security roles in CRM, a user with a portal login will only see what they are allowed to see based on what web roles they have been assigned. In my portal, I wanted to set up two different levels of access – one for a ‘Firm User’ and one for a ‘Firm Admin’. Here all you do is create a new web role, give it a name and then select the website you’re using.

N.B. when creating custom web roles, you want to set ‘Authenticated Users Role’ and ‘Anonymous Users Role’ to ‘No’.

clip_image001



2. Entity Permissions

Next you need to set up entity permissions. Here you select the entity, then define the scope, and the privileges. These work in a similar way to the regular security roles in Dynamics.

I wanted the firm users to have minimal access so that they could view their own cases but nothing else, whereas the firm admins would be given access to view all cases for their company, and also would be able to view and edit contacts. In order to do this, I set up two different entity permission records for cases, and one for contacts.

For the cases, I set up one ‘Case User’ – scope: Contact, privileges: Read, and associated this to the firm user web role. I set up a second ‘Case Admin – scope: Account, privileges: Read, and associated this to the firm admin web role.

clip_image003

For the contacts, I set up one ‘Contact Admin’ – scope Account, privileges: Read, Write Create, and associated this to the firm admin web role.

N.B. By default, all users have the ‘self’ permission granted, this basically just means that the user has access to view and edit details about their own contact through the ‘profile’ section which is set up automatically on any new portal. The profile page uses the ‘Profile Web Form’ which is imported as part of the managed portal solution, and can be edited as required.

3. Entity Forms

Entity forms are driven through system forms in Dynamics. When you create your entity form, you select the entity, then the form, then the specific tab. If you leave the tab field blank, it will default to show all tabs. You then select the ‘mode’ – the options are Insert, Edit, and ReadOnly.

ReadOnly allows the user to view the details of a record in the form, either using a query string ID, or specifying a record associated to a current user (e.g. allowing a user to read details about their linked company, using a N:1 relationship to another entity). If you want to link a form here when clicking into a specific record from an entity list, you need to select ‘Query String’ for mode.

clip_image005


Edit mode is the same as ReadOnly in terms of the selection of the record, but then allows the user to make changes to individual records.

Insert allows users to create new records, the standard example of this that comes with the demo portal is the insert form for lead ‘Contact Us’ which has a global permissions scope and is assigned to anonymous users. This simply means that anyone can access the web page without signing in, and can enter details into the ‘Contact Us’ screen, and this will create a new lead in CRM with the submitted details. This option doesn’t allow reading/editing of any existing data.

N.B. Any lookup field in your form is also subject to entity permissions – e.g. if you have a lookup to accounts, but you’ve not given your logged in user access to view any accounts, they aren’t going to be able to search or enter anything into this field.

4. Action Button Configuration

clip_image007


Under the ‘Additional Settings’ tab on the entity form, there is the option to add ‘Action Buttons’ to your form. The options you get here are based on the entity, so for the case entity you have the options to close case, resolve case, reopen case, or cancel case, whereas for the contact entity you get the options to activate or deactivate. I found the workflow option a really useful bit of functionality here, this allows the user to run any on demand workflow for a record in CRM, just by clicking a button in the portal.

5. Entity Lists

clip_image009

Entity lists are driven through system views in Dynamics. You first select the entity, then select the views available from the drop-down. You can select multiple views to allow the user to switch between them, and you can also add extra manual filters to the view results at the bottom of the page.

It’s important to tick the ‘Enable Entity Permissions’ box half-way down the page, as this will let users view whichever records you have allowed them to in the entity permissions section.

This means that you can set up just one entity list for a web page, and then different users will see different things based on their security access. For this portal, I set up one ‘Cases’ entity list, and I allowed firm users to view only their cases (the contact scope) and the firm admins to view their own and their company’s cases (the account scope).

6. Web page for details view

Add a web page here with an entity form to allow the user to click into any record in the list to view the details of the record. This form must be in ‘ReadOnly’ or ‘Edit’ mode, and the record source type must be ‘QueryString’, to ensure the user sees the record they have clicked into.

6a. Web Page for Create

Add a web page here with an entity form to allow the user to create a new record from the list view. This form must be in ‘Insert’ mode, and the logged in user must have the sufficient entity permissions to create the entity type.

6b. Web Pages

clip_image011

Web pages are what makes up the portal. You choose the partial URL, the page template, and then you define the content of the page. As soon as you create a web page, a ‘localised content’ version of that web page is automatically created. The localised content page is where the page title and content can be viewed and amended via the HTML/designer box.

6c. Web Page Access Control Rules

Web page access control rules allow you to define the level of editing power any user has over your portal, and allow you to restrict certain pages of the website to being only viewed by. Grant Change allows users to make changes to the content of the web page, while Restrict Read allows you to specify that only users with certain web roles can view the web page.

These rules work with cascading effect down to child web pages, so make sure you are certain that you want to grant changes/restrict read of all pages under the page before you apply the rule! It’s also important to remember to add the publishing state ‘published’ to your web page access control rule once you’ve completed it for the rule to take effect.

6d. Web Link Sets

Web link sets define different areas of navigation in the portal. This is really important as it is what defines how your user will navigate around the portal, if you don’t want them to have to follow specific partial URLs to view your different web pages.

The primary navigation set defines what appears along the top bar, the profile navigation defines the pages available under the user profile section. Web links make up the web link sets, in here you choose the web page, the display order number, and whether there is a parent web link. In the primary navigation set, if you set a web link to have no parent web link, it will appear as a new button on the top bar. If you set a parent web link, it will appear under that web link as a drop down. For example, I set ‘Cases’ to have no parent web link, and ‘New Firm’ to have a parent web link of ‘Home’.

clip_image013



Things to Consider

As I’m normally working in a couple of different Microsoft environments for different clients, I like to stay in private browsing mode. However, for whatever reason - the Portal Editor doesn’t work in private browsing mode! This caught me out too many times, and is a bit of a pain, but just something to be aware of if you also like to stay incognito in your browser.

I generally find the Portal Editor to be a bit slow to use, when it’s working well it’s great to be able to see your changes as you’re making them, but I actually ended up doing most of my editing through the Portal Management App in Dynamics. This I found was harder to get my head around at first than the Portal Editor, but much easier to make quick changes to (at the time of writing anyway).

Caching is another thing to be very aware of when editing the portal, if you’ve made some changes and aren’t seeing them in effect – usually clearing your browser’s cache will fix it. If this still isn’t working, then clicking the ‘Sync Configuration’ and then ‘Browse Website’ buttons at the top RHS of the Portal Editor always did the trick for me to see the most up to date changes I’d made either in the Portal Management App or in the Portal Editor.

clip_image014


We hope you found Jess’s article helpful and informative. She has recently published some other informative CRMCS articles on using the Power Platform, just visit our CRMCS Blog for more…

If you’d like to us to delve into anything in particular or want to discuss something from this article, then please email us at contact@crmcs.co.uk

Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

CRMCS Quick Start Guide: How To Produce a Microsoft Teams Live Event Dynamics 365 Marketing: Lead Scoring and Sales Acceptance Designing and Developing Microsoft Power Apps Portals Thank You for Attending CRMCS’ Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Thank You for Attending Our Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Webinar: Discover How CRMCS Have United Dynamics 365, SharePoint and Microsoft Teams To Create Sales Excellence Ignite your workflow by adding DocDrive365 to Office 365 The CRMCS guide to everything you need to know about integrating Teams with Dynamics 365 Saving Time By Keeping Documents In One Place TDE Database Encryption with On Premise Dynamics The Key to Successful Compliance in 2020 Part 2: Let’s get GDPR Compliant with Microsoft Power Automate Top 3 Essential Tips for Remote Working Dynamics 365 Marketing: Top 5 Best Features Dynamics Day in the Life - Puma Investments Can you use Teams to amplify collaboration in Dynamics? Part 1: Using a Scheduled Power Automate to Trigger Expiry Date Reminders The secrets of successful document collaboration in Dynamics CRMCS launches new AppSource approved DocDrive365 Dynamics Day in the Life - Moneypenny Release Management Add the App to Dynamics DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Building a New Scheduled Process using Flow
  • "Paul has made a real difference to how my team of 24 people record and store valuable customer data and sales opportunities. Highly recommended."

    James, Operations Director

  • "Understanding your business allows us to advise when to implement aspects of CRM and, likewise, when not to."

    Paul McQuillan, Managing Director

  • "Dynamics 365 and CRMCS have made a real lasting difference to our business, allowing us to replace older systems that were holding back our performance."

    Grahame, Chief Operating Officer

  • "James worked well with us to help connect CRM with Outlook and relate how this might benefit our team using CRM for Property Care."

    Natalie, Property Care Supervisor

  • "Matt was really good with helping us run User Testing on the new Compliance Module of our CRM System."

    Tom, Compliance Administrator

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
Manchester
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue
London

Content © CRM Consultancy.