Maptaskr for Power Pages Setup
Upload Solution Files
To upload solution file to your portal, navigate to Portal/Power Pages Management App.
-
To do this, click on the Application name in the Dynamics top ribbon next to the
Dynamics 365
title as highlighted below.A list of all available applications will be displayed. Please note that your list may not match the example below. Click on
Portal/Power Pages Management
.Figure 30: Portal/Power Pages Management App
-
Open
Web Files
under the Content sectionFigure 31: Portal/Power Pages Management Web Files
-
Create a
New
record with the following details:Table 3: Create new Web File
Column Value Name initmap.js Website *Select your portal website here* Parent Page Home Partial URL initmap.js Publishing State Published
- Portal Management
- Power Pages Management
-
Save the record and then select the
Notes
tab.Figure 32: Add initmap.js note.
-
In the Timeline control, click on the paperclip icon to upload a file.
Figure 33: Add note attachment.
-
Upload the file described in the table below. Save and close the record.
Table 4: Solution Files to Upload
File Name Type Source initmap.js JavaScript InitMap Source
-
Save the record and then select the
Choose File
button on theFile Content
column.Figure 32: Add initmap.js file.
-
Upload the file described in the table below. Save and close the record.
Table 4: Solution Files to Upload
File Name Type Source initmap.js JavaScript InitMap Source
Entity Lists
Maptaskr Entity Lists are required to be added. To add the relevant Lists
-
Navigate to
Lists
under the Content section.Figure 34: Portal/Power Pages Management Lists
The following entities needs to be created and enabled under Entity Lists -
Table 5: Entity Lists to Configure
Name Internal Name View Page Size Maptaskr Configuration List Maptaskr_configuration Active Configurations 10,000 Maptaskr Lambpet List Maptaskr_lambpet Active Lambpets 10,000 -
Click
New
to get theNew List
form. Populate the details as shown below.Figure 35 – New Maptaskr Configuration List
noteThe website name here will be the website you are installing Maptaskr on.
-
Then to add a view click on the
+ View
button as highlighted below. A new entry will appear and auto-populate with the default view for that table.Figure 36: New List +View Configuration
-
Scroll down to the
Page Size
column and set this one according to the table above.Figure 37: List Page Size Configuration
Site Settings
Maptaskr Site Settings are required to be added to the portal. To add the relevant Site Settings:
-
Navigate to
Site Settings
under the Website section. -
Add the following Site Settings to enable communication with the entities -
Table 6: Site Settings
Name Value Webapi/annotation/enabled true Webapi/annotation/fields * Webapi/maptaskr_configuration/enabled true Webapi/maptaskr_configuration/fields * Webapi/maptaskr_lambpet/enabled true Webapi/maptaskr_lambpet/fields * Webapi/maptaskr_layergroup/enabled true Webapi/maptaskr_layergroup/fields * Webapi/maptaskr_layers/enabled true Webapi/maptaskr_layers/fields * An example of how to populate this record is shown below.
Figure 38: New Site Setting - Example
Web Roles
Web Roles are required to ensure that portal users have permission to map related tables. Newly registered users should be configured to automatically be assigned to the below Web Role(s), this needs to be performed by a Power Apps Administrator. For more information, please refer to the Microsoft documentation for Creating and assigning a Web Role.
Navigate to Web Roles
under the Security section.
Figure 39.1: Add Web Role
The following web role needs to be added/created:
Table 8: Web API User
Property | Value |
---|---|
Name | Web API User |
Authenticated Users Role | Yes |
Anonymous Users Role | No |
Figure 39.2: New Web Role Creation
Once you've entered the detail save and close the new active web role.
Table Permissions
Navigate to Table Permissions
under the Security section. From here you will need to create various table permissions as shown below.
Figure 40: Table Permissions
Figure 41: New Table Permissions screen
The following five (5) table permissions are required to be created:
- Annotation Permission
- Lambpet Permission
- Maptaskr Configuration Permission
- Maptaskr Layer Group Permission
- Maptaskr Layer Permission
When creating table permissions, the ability to add Web Roles is only available after saving the record.
The table below gives an overview of the settings required for each table permission.
Table 9: Table Permissions Overview
Name | Table Name | Access Type | Privileges | Web Roles |
---|---|---|---|---|
Annotation Permission | annotation | Global | Read, Write, Create, Delete, Append and Append To | Web API User |
Lambpet Permission | maptaskr_lambpet | Global | Read, Write, Create, Delete, Append and Append To | Authenticated Users, Web API User |
Maptaskr Configuration Permission | maptaskr_configuration | Global | Read | Web API User |
Maptaskr Layer Group Permission | maptaskr_layergroup | Global | Read | Web API User |
Maptaskr Layer Permission | maptaskr_layers | Global | Read | Web API User |
Add Table Permissions to Web Roles
Once the permissions in section Table Permissions have been created, they are required to be added to the Web API User
previously created.
- Portal Management
- Power Pages Management
-
Head back to
Web Roles
and select theWeb API role
.Figure 42: Add Table Permissions to Web Role.
-
From here go to the
Related
tab section and selectTable Permissions
-
Add the following permissions to
Web API User
as shown in Figure 42: Add Table Permissions to Web Role- Annotation Permission,
- Case Permission,
- Lambpet Permission,
- Maptaskr Configuration Permission,
- Maptaskr Layer Group Permission and
- Maptaskr Layer Permission
-
Within the newly created Table Permission record form, scroll down to the
Web Roles
subgrid.Figure 42: Add Web Role to Table Permissions.
-
Select
Add Existing Web Role
. -
Search for
Web API User
in the Lookup Records tab that has popped up on the right-hand side of the screen, select it and clickAdd
. The pop-up should disappear and theWeb Roles
subgrid should now display theWeb API User
role. -
Repeat steps 1-3 for the following tables:
- Annotation Permission,
- Case Permission,
- Lambpet Permission,
- Maptaskr Configuration Permission,
- Maptaskr Layer Group Permission and
- Maptaskr Layer Permission
Web Templates
Navigate to Web Templates
under the Content section. Here you will need to create multiple Web Templates as shown below.
Figure 43: Maptaskr Web Templates
The table below shows Maptaskr Web Templates to add, including the name and source of each of the Maptaskr Web Templates that are required to be created. Please note that there are some specific considerations for the Maptaskr Custom Layer Search template detailed in the Maptaskr Custom Layer Search section.
Table 10: Maptaskr Web Templates to add.
Web Template Name | Source |
---|---|
Maptaskr Custom Layer Search | See Appendix A: Web Templates |
Maptaskr Lambpet Search | |
Maptaskr Layer Group Search | |
Maptaskr Related Shape Search | |
Maptaskr Shape Search | |
Maptaskr Dataverse Layer |
Figure 44 – Web Template example source record.
Maptaskr Custom Layer Search
Due to differences between the Maptaskr Layer table that comes with the Maptaskr Core solution you will need to be mindful of the following fields in your template.
- Core Solution version 2.2.1.58 and earlier DO NOT INCLUDE Static Token OR Additional Parameter fields in your template.
- Core Solution version 2.2.1.59 up to 2.2.1.63 DOES NOT INCLUDE Additional Parameters field in your template.
- Core Solution version 2.2.1.64 and up you can use both fields in your template without issue.
Updating other Web Templates
The following information applies to out of the box installations of the Power Apps Power Pages/Portals.
Please keep in mind that if you have a highly customized setup, Power Apps Administrators will need to configure Web Templates for Maptaskr. This can be done by updating the default Web Templates or by creating new Web Templates for specific forms.
-
Navigate to the
Active Web Templates
list under the Content section.Figure 45: Edit Web Template
-
Edit
Full Page without Child Links
-
Update the following template source to include reference to initmap.js–
noteReplace only the highlighted area with correct reference filename.
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"
type="text/javascript">
</script>
<script
src="/initmap.js"
type="text/javascript">
</script>
Page Templates
The following five (5) Maptaskr Page Templates are required to be created;
- Maptaskr Custom Layer Search
- Maptaskr Lambpet Search
- Maptaskr Shape Search
- Maptaskr Layer Group Search
- Maptaskr Related Shape Search
Please ensure you untick the "Use Website Header and Footer" checkbox when creating the Page Templates.
Figure 46: Untick "Use Website Header and Footer" checkbox.
-
Navigate to
Page Templates
under the Website section and clickNew
to create the Page Templates as specified in Table 11: Maptaskr Page Templates.Figure 47: Page Templates
Table 11: Maptaskr Page Templates
Name Type Web Template Use Website Header and Footer Maptaskr Custom Layer Search Web Template Maptaskr Custom Layer Search False Maptaskr Lambpet Search Web Template Maptaskr Lambpet Search False Maptaskr Shape Search Web Template Maptaskr Shape Search False Maptaskr Layer Group Search Web Template Maptaskr Layer Group Search False Maptaskr Related Shape Search Web Template Maptaskr Related Shape Search False
Web Pages
The following five (5) Maptaskr Web Pages are required to be created;
- Maptaskr Custom Layer Search
- Maptaskr Lambpet Search
- Maptaskr Shape Search
- Maptaskr Layer Group Search
- Maptaskr Related Shape Search
-
Navigate to
Web Pages
under the Content section. ClickAdd
and create the required pages as outlined in Table 12: Maptaskr Web Pages to create.Figure 48: Maptaskr Web Pages
Table 12: Maptaskr Web Pages to create.
Name Parent Page Partial-URL Page Template Publishing State Maptaskr Custom Layer Search Home custom-layer-search Maptaskr Custom Layer Search Published Maptaskr Lambpet Search Home maptaskr-lambpet-search Maptaskr Lambpet Search Published Maptaskr Shape Search Home maptaskr-shape-search Maptaskr Shape Search Published Maptaskr Layer Group Search Home maptaskr-layergroups Maptaskr Layer Group Search Published Maptaskr Related Shape Search Home maptaskr-related-shape-search Maptaskr Related Shape Search Published
Advanced/Multistep & Basic Forms
To enable shape submission functionality from the Maptaskr PCF in forms, a small JavaScript code snippet needs to be included as part of the form step question.
Forms within Dynamics 365 needs to be configured, and a new section needs to be created. For more details, please refer to Table Setup. The following sections provide an overview of where and how to add the code snippet to either a Basic or Multistep form.
Due to the way Power Pages/Portals are architected, maps requiring data submission in a create scenario need to be placed in a subsequent step to ensure that the map has access to the record's newly generated GUID to create the neccessary relationship connections.
In the case of Basic Forms, this will require a separate form.
In the case of Advanced/Multistep Forms, this will require a new form step.
Basic Form – (Create & Edit)
Navigate to the Basic Form you are wanting to configure by Going to Basic Forms
and clicking on the form listed. For the below example we will be using the simple contact us form
.