Contact Management from Dynamics 365 Portal – Part 1
Situation
- The Customer service Portal using Azure AD authentication was being used by the client to collaborate on products changelogs, consumption changes, Invoices, project documents and updates, customer service tickets and Company information management
- Customers have multiple users belonging to different departments who need to access the portal and review and update information in different capacities.
- Every time a new client stakeholder needs to be given access/ removed to the portal, the CRM admin team needed to action it.
- The onus of security of critical client information management was entirely on the CRM team.
Requirement
- Transfer onus of security:
- CRM Admin to create one portal user from the customer Contacts who would have permission to create, update and deactivate other contacts from his organization – the client “portal user manager”
- Managing users:
- He should be able to assign the required Roles and even create other Portal user managers.
- He should be able to deactivate these users and also update their portal role if needed. However, they should not be deleted from CRM.
- User Access:
- Users should be sent an invitation to be redeemed via email when they are created.
Solution
- Go to Portals ➤Web Roles and create web roles
- Portal user manager
- Portal Finance User
- Portal IT User
- Portal Project user
- Create a two-options field for each Web role above on the Contact entity
- Create a new web Contact form in CRM. Fields
- Full Name
- Account
- Work Email address
- Contact details
- Web role two-options [for as many roles defined]
- Go to field properties ➤ Formatting ➤ Control Formatting ➤ Select Checkbox
- Is Portal contact
- Create a copy of the above form for the update contact process
- Create a view in CRM – “Show Portal Contacts”
- Add filter Status Reason=Active and Is Portal Contact=Yes
- New Portal Contact page
- Go to Portals ➤ Entity Forms ➤ New and Create new entity form for new Contact. Select mode as Insert.
- Add the below script to set the ‘Is Portal contact ‘ to true and hidden
- Go to Portals ➤ Entity Forms ➤ New and Create new entity form for new Contact. Select mode as Insert.
$(document).ready(function() {
$(‘#iotap_isportalcontact’).prop(‘checked’, true);
$(‘#iotap_isportalcontact’).hide();
$(‘#iotap_isportalcontact_label’).hide();
});
- Go to Portals ➤ Web Pages ➤ New and Create web page for new contact entity form.
- Update Portal Contact page
- Go to Portals ➤ Entity Forms ➤ New and Create new entity form for update Contact. Select mode as Edit.
- Go to Portals ➤ Web Pages ➤ New and Create a web page for update contact entity form.
- The default “Invitation” entity and the workflow “send Invitation” will be used
Create an on-demand workflow on Contact entity to trigger when “Record is created” to associate web role and send a portal invitation when a new contact is created from the portal.
- Manage Users page
- Go to Portals ➤ Entity Lists ➤ New and enter Name, Entity Name-Contact(contact), Website-your website, click +view button select view “Show Contacts Portal” and then again select +view button and select “Active Contacts”
- Grid Configuration ➤ Item Actions ➤ +Edit and set Target Type as Entity Form, Entity Form- “Update Contact” and Button Label as “Edit”
- Grid Configuration ➤ Item Actions ➤ +Deactivate and set Button Label as “Deactivate”
- Go to Portals ➤ Web Pages ➤ New and create a web page for “Manage users” entity list
- Create a navigation Link – “Manage users” which is accessible only to the Portal user manager role
- Go to Portals ➤ Web Link Sets ➤ Primary Navigation ➤ Links ➤ Add New Web Link with Name, Publishing state as Published, Parent WebLink as Home, Page as “Manage users”.
- Go to Portals ➤ Web Page Access Control Rules ➤ New and create Access rule with Name, Right as “Restrict Read”, select “Web Page” and select “Web Role” “Portal user Manager”.
- Create a duplicate detection rule [if not available] based on the contact email Id, so that duplicate contacts are not created by the user manager.
- Go to Settings ➤ Data Management ➤ Duplicate Detection Rules ➤ New
- Publish.
- Go to Settings ➤ Data Management ➤ Duplicate Detection Rules ➤ New
- New button
- Go to Portals ➤ Entity List->Select entity list “Manage users” set Web Page for create and Create Button Label as “New”
The completed customization
Also, check out Contact Management from Dynamics 365 Portal – Part 2