Understanding Scope (Global, Contact and Account) in Entity Permission in Portal (Dynamics 365)

Let us take an example of the below Entity List configured for Case entity configured for Active Cases view.

For Entity Permission to work we need to check Enable Entity Permissions.

Let us first create an Entity Permission record with Global Scope and Read Privileges and assign it to a custom web role to which in turn is assigned to the Portal User.

Below we have Case Entity Permission record associated to our My Custom Web Role.

My Custom Web Role is then associated with the portal contact record.

Scope – Global with Read Privelges à

This shows all the Active Case records in the portal.

Now let us change the Scope to Contact, and specify Conact_As_Primary_Contact as the relationship to be considered i.e. Contact Lookup in Case entity form.

Scope – Contact

This shows all the case records that has current portal user as Contact as well as those records which has Customer specified as the account which is the Parent Account of the current contact portal user.

i.e.

The portal view is filtered based on the Contact Scope Entity Permission.

Now let us change the Scope to Account, and specify Incident_customer_accounts as the relationship to be considered i.e. Customer Lookup in Case form.

Scope – Account

This shows only those case records that has Customer specified as the Parent Customer of the current logged in Portal Contact User.

Hope it helps..

Configuring View and Item Actions for Entity List in Portal in Dynamics 365

Similar to configuring Actions for Entity Form we can specify Actions for Entity List.

https://nishantrana.me/2017/02/27/adding-actions-qualify-workflow-delete-etc-for-entity-form-in-portal-in-dynamics-365/

Let us take example of Case List that comes configured with Community Portal for incident\cases entity.

Inside portal this is how the list shows up as grid à

To define Actions we need to go to Options tab à
Grid Configuration

View Actions lets us define actions for the View which are Create and Download.

For Create we need to define an entity form, web page or an URL configured for Insert for incident record.

Below we have selected Target Type as Entity Form and Create Case as the Entity Form.

This adds the Create button in the portal

Clicking on Create opens the Entity Form for Insert.

Download Action lets user to export the records to Excel

This adds the Download button in the page.

Clicking on Download opens the save as dialog

For Details and Edit Item Actions we need to specify either Web Page, Entity Form or URL to a page having Entity Form defined for Incident\Case entity.

Below we have specified the Edit Case Entity Form.

Inside Portal

Clicking on them opens the Entity Form

Similarly, we can add rest of the Item Actions like Delete, Close, Resolve, Cancel etc.

This add the corresponding options to the grid in the portal.

As we are showing all the Active Records it automatically hides the Reopen Case button.

Here clicking on Cancel Case, cancels the Case record in CRM and shows the below message in the portal.

For Workflow Action, we can define an On Demand Workflow created for the Case Entity.

Suppose we have following workflow defined for Case.

Configuring the same inside Entity List

In the portal we get the option to Run Workflow

Clicking on it gives the below message

Hope it helps..

Configuring Note for Entity Form in Portal in Dynamics 365

Suppose we have below form for Contact to be displayed as Entity Form in Portal having notes control in it.

The Entity Form configured for the above form à

The portal page that displays the Entity Form à

Few points we need to remember here is that

  • The Portal User (contact record) needs to have Entity Permission assigned on Notes (Annotation) through one of the web roles assigned. For simplicity I have given the Global scope permission.

  • The Notes title should start with *WEB* prefix for Notes to be published on the Portal. For e.g. we have 3 notes attached for the contact record but only one shows up in the Portal.

Only 1 note being displayed in the portal.

The Portal displays the Notes as read only OOB.

We can use Entity Form Metadata of type Notes associated to Entity Form to further customize it.

Below are the different options that we have.

Refreshing the Portal page adds the

Add Note button

Edit and Delete Option

Hope it helps..

Using Entity Form Metadata for Sub Grid configuration in Entity Form in Portal in Dynamics 365

Suppose we have following Entity Form configured for Lead Entity in Edit Mode which is having Contact Sub Grid in it.

Contact Us Lead Form with Contact Sub Grid:

Entity Form Configuration:

The Sub Grid renders as read only

We can further customize Sub Grid creating related Entity Form Metadata of type Sub Grid.

Suppose we have added all the below View and Item Actions to our Sub Grid type metadata.

On refreshing the page, we can see all the actions available as buttons in the page.

For Create to work we need to define the Insert Entity Form for Lead.

Download lets the records to be downloaded in Excel

Associate lets the current lead record to be associated to the contact record selected.

Similarly

View Details opens up the Entity Form defined in the Read Only mode. Edit opens the Entity Form to edit the record. The Entity Form must be configured and defined in the Item Actions for it to work.

Run workflow can be used to run On Demand Workflow(s) configured.

Delete, Disassociate and Deactivate does what it means and doesn’t need any specific configuration.

Hope it helps..

Adding Actions (Qualify, Workflow, Delete etc.) for Entity Form in Portal in Dynamics 365

Hi,

Apart from the Submit button we can additional Actions to the Entity Form like Delete, Workflow, Qualify (in case of lead) etc.

To understand this, we will use the Contact Us Entity Form that comes with Community Portal.

Let us add Delete, Workflow and Qualify action to it. However before doing that we first need to check Enable Entity Permissions on the Entity Form for actions to work.

And as we have enabled the Entity Permission we need to make sure that the portal user has the appropriate permissions through the web role assigned to him.

Below we have created a global entity permission for Lead record and added it to the Web Role which is assigned to the portal user.

Else we would get the below error

One more thing we need to do here is to change the Mode of the Entity Form to Edit as the delete and workflow action will only work for an existing record.

So here basically we are showing the lead record to which current Portal User (i.e. contact) is associated as Parent Contact.

For the workflow, we need to remember that only On Demand Workflow(s) would be available for the actions inside the Entity Form, which does make sense, as it would be something which the user is triggering instead of conditions on which it is running automatically.

Now open the Entity Form, go to Additional Settings tab and add the actions to it.

Below we have added Delete, Workflow and Qualify action. The Qualify action is specific to Lead only.

Refresh the web page in the portal, we will see the buttons added for the Actions.

For Qualify button to appear, we need to make sure the portal user has appropriate rights on Account, Opportunity and Contact entity along with Lead. For simplicity, we have added Global Entity Permission for those entities to the web role assigned to the portal user.

Entity Permission Associated View for the Web Role record: –

On refreshing the page again, we can see the Qualify Button.

On clicking Qualify button à

The confirmation message à

Hope it helps..

Using Entity Form Metadata to configure the Entity Form in Portal in Dynamics 365

Sharing a simple example wherein we are configuring the First Name field of the Contact Us Entity Form for the lead entity using Entity Form Metadata.

Suppose we have the below Entity Form configured for Lead entity.

Now go to Entity Form Metadata tab and create a new record.

The record allows us to configure Attribute, Notes, Section etc.

Let us configure the First Name field.

Change the label to “Please Enter First Name”.

First select Type as attribute and specify “firstname” as the attribute to be configured. And then provide the Label.

Prepopulate the field from the First Name of the Current Portal User.

Make the field required

Add instructions to the field

Refreshing the page in the portal updates the first name field in the portal accordingly –

Hope it helps..