Skip to main content

Lock appointments for users

This guide shows you how to lock appointmentsAppointmentA task scheduled to a resource for a specific period - the scheduled instance you see on the planning board. so that some users, or all of them, can no longer edit them. The authorization mechanism in Dime.Scheduler is data-driven, which lets you build fine-grained security workflows around your customer's business processes. As with most of Dime.Scheduler, the back officeBack officeThe ERP or business system Dime.Scheduler plans for - most often Microsoft Dynamics 365 Business Central. It owns the master data and remains authoritative over what it receives. drives the configuration and you control the locking from there.

Authorizing users in Dime.Scheduler​

This guide builds on data-driven securityData-driven securityRestricting which records a user can see based on the data itself - for example a region or business unit - rather than on their role.. For the full picture, see data-driven security. In short, you can lock appointments and resources using filter groupsFilter groupA configurable set of fields used to filter resources and tasks on the planning board. or visual indicatorsIndicatorCollective term for the visual signals - categories, time markers, pins, and tags - that identify and label appointments.:

  • With security on filter groups, you segregate roles and responsibilities. For example, users can be configured to only see resources and tasks from a limited number of companies, departments, regions, etc.
  • With security on visual indicators such as categoriesCategoryA visual indicator (a color) applied to appointments to classify or label them. and time markersTime markerA visual indicator on an appointment, separate from its category, used to flag a status or condition at a point in time., you implement a data and workflow-driven authorization based on the floating values of categories and time markers. For example, users can be barred from modifying the data when an appointment is in a certain state.

Filter groups restrict what resources and tasks a user can see, while indicators limit what a user can do with (planned) tasks.

When you combine security on filter groups, categories and/or time markers, the most restrictive setting wins: every condition must be met before the user can modify the appointment.

info

This data-driven authorization mechanism doesn't necessarily mean users won't see the appointments on the planning board. While users will see all appointments for the resources they see on the planning board, they won't be able to edit or delete appointments that are outside of their security permissions.

Filter group authorization​

Filter groups restrict what resources and tasks a user can see.

Once you have set up the filter groups in the back office and sent them to Dime.Scheduler, apply the data-driven security as follows:

  1. In Dime.Scheduler, go to the Users administration page.
  2. Select the user you want to secure.
  3. In the bottom tab panel, select the filter group tab.
  4. Select the values that apply to that user.

From now on, this user will only see resources and tasks that match the selected filter valuesFilter valueA single value inside a filter group, used as a qualification on a resource or a requirement on a task..

Indicator authorization​

Authorizing users through indicators works the same way. Indicators limit what a user can do with (planned) tasks.

Once you have set up the categories and time markers in the back office and sent them to Dime.Scheduler, apply the data-driven security as follows:

  1. In Dime.Scheduler, go to the Users administration page.
  2. Select the user you want to secure.
  3. Navigate to the pane at the bottom.
  4. Select the categories and time markers that apply to that user.
tip

When you send a job or task from the back-office system to Dime.Scheduler, you can specify default indicators. These values are applied when the user drops the open taskOpen taskA task that has not been scheduled yet. It waits in the open task list to be placed on the planning board. to the planning board.

From now on, this user will only be able to modify appointments that match the selected indicators.

Locking an appointment from the back office​

You can lock tasks and appointments in two main ways: programmatically or data-driven.

Locking programmatically​

You can also lock appointments directly. Use the web service function mboc_updateAppointmentLocked to lock or unlock a single appointment. To lock or unlock every appointment linked to a given task, use mboc_updateTaskLocked.

Call this low-level function directly, or reach for one of the platform-dependent wrappers below.

Dynamics​

In NAV/BC, you can use the function UpdateLocked or UpdateLockedFromId in codeunit 2087643 "DS Update Appointment Status".

SDK / CLI​

The SDK and CLI can lock appointments and tasks too. Both post a TaskLocked record: sourceApp, sourceType, jobNo and taskNo identify the task, and locked is true to lock or false to unlock. With the CLI:

dimescheduler task-locked create --json '{"sourceApp":"BC_CRONUS","sourceType":"SERVICE","jobNo":"SO001","taskNo":"SO001_LINE10","locked":true}'

The same call with the JavaScript SDK:

await client.taskLocked.create({ sourceApp: "BC_CRONUS", sourceType: "SERVICE", jobNo: "SO001", taskNo: "SO001_LINE10", locked: true });

Use appointment-locked / client.appointmentLocked instead to lock a single appointment rather than every appointment of a task.

Locking with data​

When you update an appointment from the back-office application to Dime.Scheduler, you can change its indicators. Every change is reflected immediately, which makes the data-driven mechanism reevaluate. This makes it easy to create an indicator such as 'Locked' and assign it to a limited group of authorized users, so the appointment won't accidentally be updated without permission.