Views:

Overview

The North52 BPA Data Packager functionality allows you to easily move data stored in records from one Dynamics 365 CE/Dataverse instance to another.  This is a common scenario when deploying changes for Dynamics Portals. 

In this article we describe how you can deploy a Web Form for a custom entity from a development instance to another instance. The business scenario is that you would like your customers to be able to register products they have purchased. The customer will need to be signed into the portal and can create a new Product Registration by selecting from a list of Products and entering the serial number of the product they have purchased. 

Import Solution, Portal Records

We are going to create a Dynamics 365 Solution to hold all the related artifacts and enable us to deploy from our Development environment to a Test and Production instance. We will also create the necessary portal configuration records to be able to display our custom entity list and form on the portal. Finally, we will create the North52 Data Package to enable us to deploy the relevant portal records.

Prerequisite

You will need a Dynamics 365 instance with the Community Portal installed to complete this tutorial. To provision the Community Portal follow the Microsoft documentation.

Import Solution

Create the new entity, attributes, forms and views for the above scenario by importing this sample solution file. Once imported click the Publish All Customizations button and wait for the N52 Publish All workflow to complete - view progress via System Jobs. You can quickly access System Jobs from the North52 App Start Page, by clicking the System Jobs button under the Administration section.

The solution contains: 

  • A new Entity called Product Registration
    • Three custom fields:
      • Contact - lookup to Contact entity
      • Product - lookup to Product entity
      • Serial Number - single line of text field
    • A new Web Form for the Product Registration entity
    • A new Web View for the for the Product Registration entity which will be used for the Entity List
  • A real-time workflow to update the Product Registration Name field to be a combination of the Contact, Product and Serial number
  • A Data Package that we can use to set up the Portal Records

Portal Records

To display our new entity on the portal and allow our logged in users to create new Product Registrations we need to set up the portal records listed below. We are going to speed up the creation of these records using the Data Package included in the solution you imported in the stage above - follow these steps:

  • Navigate to the North52 App and select Business Process Activities > N52 Data Package
  • Open the Data Package - Product Registrations
  • Click the lightning bolt icon in the editor navigation bar to open the panel to execute the Data Package, then click the Execute button
  • The Data Package will then:
    • Disable the relevant SDK processing steps and Processes
    • Create the following portal records:
      • Entity Permissions
        • An Entity Permission record to enable the reading of Products (for the lookup)
          • Association of the Authenticated Users Web Role
        • An Entity Permission record to enable the reading and creating of Product Registrations
          • Association of the Authenticated Users Web Role
      • Entity Form
        • An Entity Form record that will be shown on the New Product Registration web page. This will use the specific form set up for use on the portal.
      • Entity Form Metadata
        • On the Entity Form we wish to display the Product lookup as a drop-down list so we create an Entity Form Metadata record to set this
      • Entity List
        • An Entity List record based on view that was specifically set up for use on the portal
      • Web Page
        • Two web pages:
          • Product Registrations - shows the list of product registrations using the Entity Form
          • New Product Registration - renders the Entity Form to allow new Product Registrations to be created
      • Web Link
        • Adds the Product Registrations page to the main navigation
    • Re-enable the SDK processing steps and Processes

Testing

After the Data Package has completed executing the new functionality will be available on your portal. To test the functionality:

  • Ensure the all the portal changes are made available on the portal by refreshing the portal cache
    • Sign in to your portal as an Administrator
    • Navigate to https://[your portal URL]/_services/about
    • Click the Clear Cache button
  • When the portal refreshes there should be a Product Registrations link under Support
  • Click this link to open the Product Registrations page
  • Click the Create button to add a new Product Registration
    • Select a Product
    • Enter some text for the Serial Number
    • Click Submit

Related attachments (1)