CRMJettyBack to crmjetty.comContact us
Menu
Docs / Guides

CRMJetty Portal

Works with
Docs / Dynamics 365

Dynamics 365 Customer Portalv6.3.0

Docs / Salesforce

Salesforce Customer Portalv6.3.0

Docs / Business Central

Business Central Portal

Guides / Workflows

How to Restrict Record Access with Conditional Workflows

5 min readUpdated
Short answerGo to Settings → Portal Settings → Workflow Management and select Create. Choose the roles and entity, select the Update Assigned Rights action type, choose the operations to disable (Edit, Detail or Delete) and add conditions. Select Save, then select the workflow in the widget's Update Assign Rights Workflow setting.

Role permissions apply to every record of an entity a portal user can reach. An Update Assigned Rights workflow takes away a right only for records that match conditions. For example, let customers delete their orders, but not orders that are complete or cancelled.

Note: Portal workflows restrict or filter records. They don’t send notifications; triggers do. See How to Automate Portal Emails with Triggers.

Before you start

What the workflow can restrict

Operation When disabled for matching records
Edit Portal users can’t edit the record.
Detail Portal users can’t open the record’s detail view.
Delete Portal users can’t delete the record.

The workflow applies only to rights the user’s role already gives. It can’t grant a right the role doesn’t have. Records that don’t match the conditions keep the rights from the role.

Create an Update Assigned Rights workflow

  1. Go to Settings → Portal Settings → Workflow Management.
  2. Select + Create.
  3. In Title, enter a name, for example No delete on closed orders.
  4. In Roles, select the portal user roles the restriction applies to.
  5. In Entity (Business Central: Table), select the entity, for example Order.
  6. In Action Type, select Update Assigned Rights.
  7. In Select CRUD Operations to disable access, select Edit, Detail or Delete. You can select more than one.
Create Workflow page with Action Type set to Update Assigned Rights and Delete selected in the CRUD operations to disable
Create Workflow page with Action Type set to Update Assigned Rights and Delete selected in the CRUD operations to disable
Create Workflow page with Action Type set to Update Assigned Rights and Delete selected in the CRUD operations to disable
Create Workflow page with Action Type set to Update Assigned Rights and Delete selected in the CRUD operations to disable

Add the conditions

  1. In Field, select the field to check, for example Status.
  2. In Operator, select how to compare, for example Equals.
  3. Select the values, for example Complete and Cancelled.
  4. To add more conditions, select Add Rule, and group rules with AND or OR.
  5. Select Save.
Workflow conditions with Status, Equals and the values Complete and Cancelled selected
Workflow conditions with Status, Equals and the values Complete and Cancelled selected
Workflow conditions with Status, Equals and the values Complete and Cancelled selected
Workflow conditions with Status, Equals and the values Complete and Cancelled selected

For more on operators, value types and grouping, see How to Filter Which Records Portal Users See.

Example

Setting Value
Entity Order
Action Type Update Assigned Rights
Operations to disable Delete
Condition Status equals Complete or Cancelled

Portal users can still delete orders in other statuses, if their role has Delete. Complete and cancelled orders have no delete option.

Apply the workflow to a widget

  1. Go to Design → Page Builder and open the page in edit mode.
  2. Select the Settings icon on the widget that shows the records.
  3. Under Workflow Setting, select the workflow in Update Assign Rights Workflow.
  4. Select Save.
  5. Publish the page.
List widget Workflow Setting with the Update Assign Rights Workflow drop-down
List widget Workflow Setting with the Update Assign Rights Workflow drop-down
List widget Workflow Setting with the Update Assign Rights Workflow drop-down
List widget Workflow Setting with the Update Assign Rights Workflow drop-down

For the setting in each widget, see How to Apply Workflows to Portal Widgets.

Combine filtering and restrictions

You can use both workflow types on the same widget. For example, for a support team role on the Case entity:

Workflow Condition Result
Load Data Priority equals High or Urgent Only high and urgent cases show.
Update Assigned Rights Priority equals High or Urgent; disable Delete Those cases can’t be deleted.

Restrict child records in a sub-grid

In a sub-grid, Select Workflow Restriction lets you choose a parent workflow that controls access rights to the child records. See How to Add Sub-Grids to Portal Forms.

Troubleshooting

Portal users can still edit or delete matching records: The workflow isn’t selected in the widget’s Update Assign Rights Workflow setting, or the page wasn’t published after you selected it. Also check that the user has one of the workflow’s roles.

A record has no delete option although the role has Delete: The record matches an active Update Assigned Rights workflow. Check the workflow’s conditions in Workflow Management.

Did this solve it?No, contact support