Send Invite to Contacts automatically for Microsoft Portal in Dynamics 365

By | August 23, 2017

Introduction:

After installing/configuring the Portal for Dynamics 365 online, the first question that comes to our mind is, how will we give the Portal access/login to contacts?

In this blog, we will discuss few questions related to Portal access.

Question #1

As a System Administrator/CRM User, how can we send an invitation to Dynamics CRM contacts in order to provide access to Microsoft Dynamics CRM/365 Portal?

We can send an invitation to Dynamics CRM contacts by following few simple steps.

1. First, open the Contact record to which you want to send an invitation.

2. Then, click on Create Invitation button to create Invitation record with Invitation Code.

3. Save the Invitation record.

4. Now, run the Send Invitation

An email with the invitation link will be sent to the Contact.

Refer the following link to know more about these steps, https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/portal-authentication/registration-and-invitations/invitations/

Question #2

As a System Administrator/CRM User, how can we send an invitation automatically when a contact is created in Dynamics CRM in order to provide access to Microsoft Dynamics CRM/365 Portal?

We can achieve this using a combination of manual workflow and workflow assembly. We need to create one workflow which will trigger on the creation of a contact. And then we just need to execute the steps mentioned above through the workflow.

However, generating invitation code is a bit tricky. We have to pass the Invitation code (which is unique for invitations) along with the invitation link.

Below is the screenshot of the workflow and explanation for each step;

Send Invite to Contacts automatically for Microsoft Portal in Dynamics 3651. Create an Invitation Code:

We have to call the workflow assembly that returns an auto-generated Invitation code as an output parameter.

Code that generates the invitation code (This is the same logic of generating invitation code as in OOB Invitation process.)

2Create an Invitation Record:

This workflow step will CREATE an Invitation entity record. Set the output parameter returned by Step 1 in the Invitation code. Then set the other required fields; Sender, Name, Type, Invite Contact, Assign to Account, etc.

3Call child workflow that runs for Invitation entity:

This workflow will create and send an invitation link. Below is the screenshot of the child Workflow;

Send Invite to Contacts automatically for Microsoft Portal in Dynamics 365 1a) Create Email:

This step creates an email record where we need to add an invitation link in the email body. Append the invitation code that we generated and saved on the Invitation record, at the end of portal invitation URL.

Send Invite to Contacts automatically for Microsoft Portal in Dynamics 365b) Call ‘Portals: Send Invitation’ assembly:

Call Microsoft Portal’s ‘Send Invitation’ custom workflow assembly that sends the email created above to invitees.

c) Update status of invitation record to Invitation sent:

The next step is to update the Invitation Record to set status reason as Sent.

4. Stop workflow:

The final step is to stop the workflow.

Hope this helps!

Clone Dynamics CRM/365 Records

Leave a Reply