Lock appointments for users
Appointments can be locked from the back-office systems. Using data-driven methods, the authorization mechanism in Dime.Scheduler allows for fine-grained security workflows. In the spirit of Dime.Scheduler's design, the back-office system plays a key role in all of this. We provide you the tools necessary to implement your customer's business processes.
In this guide, you will learn how to lock appointments so that they aren't editable for some users, or all of them.
Authorizing users in Dime.Scheduler
Data-driven security is a key concept for this guide. For more information, continue here. In a nutshell, appointments and resources can be locked by using filter groups or visual indicators:
- 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 categories and time markers, 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.
Be aware that if you combine security on filter groups, categories and/or time markers, the most restrictive setting is applied. All conditions have to be met for the user to be able to modify the appointment.
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.
When you have set up the filter groups in the back office and sent it to Dime.Scheduler, you can apply the data-driven security there:
- In Dime.Scheduler, go to the Users administration page.
- Select the user for whom you want to apply security.
- In the bottom tab panel, select the filter group tab.
- Select the values that apply for that user.
From this moment on, this particular user will only see resources and tasks that match the selected filter values.
Indicator authorization
It's more of the same story when it comes to authorization users through the indicators. Indicators limit what a user can do with (planned) tasks.
When you have set up the categories and time markers in the back office and sent it to Dime.Scheduler, you can apply the data-driven security there:
- In Dime.Scheduler, go to the Users administration page.
- Select the user for whom you want to apply security.
- Navigate to the pane at the bottom.
- Select the categories and time markers that apply for that user.
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 task to the planning board.
From this moment on, this particular user will only be able to modify appointments that match the selected indicators.
Locking an appointment from the back office
There are primarily two ways to lock tasks and appointments: programmatically or data-driven.
Locking programmatically
Nothing stops you from manually locking appointments. You can use the web service function mboc_updateAppointmentLocked
to lock or unlock an appointment. For more information on this action. Use the web service function mboc_updateTaskLocked
to lock or unlock all appointments linked to a given task.
This low-level function can be invoked directly, or you might consider platform-dependent wrappers.
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 be used too to lock appointments and tasks. For example, the tasklocked
command allows you to lock or unlock any task that's available in your Dime.Scheduler instance:
dimescheduler tasklocked --help
██████╗ ██╗███╗ ███╗███████╗ ███████╗ ██████╗██╗ ██╗███████╗██████╗ ██╗ ██╗██╗ ███████╗██████╗
██╔══██╗██║████╗ ████║██╔════╝ ██╔════╝██╔════╝██║ ██║██╔════╝██╔══██╗██║ ██║██║ ██╔════╝██╔══██╗
██║ ██║██║██╔████╔██║█████╗ ███████╗██║ ███████║█████╗ ██║ ██║██║ ██║██║ █████╗ ██████╔╝
██║ ██║██║██║╚██╔╝██║██╔══╝ ╚════██║██║ ██╔══██║██╔══╝ ██║ ██║██║ ██║██║ ██╔══╝ ██╔══██╗
██████╔╝██║██║ ╚═╝ ██║███████╗██╗███████║╚██████╗██║ ██║██ █████╗██████╔╝╚██████╔╝███████╗███████╗██║ ██║
╚═════╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝
Dime.Scheduler 1.0.0
Copyright (C) 2022 Dime Software
--sourceapp The source app.
--sourcetype The source type.
--jobno The job's unique identifier.
--taskno The task's unique identifier.
--locked True to lock the task.
--sentfrombackoffice True to mark the appointment is sent from the back office.
-u, --URI Required. The base URI of Dime.Scheduler.
-c, --user Required. The Dime.Scheduler user's email address.
-p, --password Required. The Dime.Scheduler user's password.
-a, --append (Group: action) Append the record to Dime.Scheduler.
-d, --delete (Group: action) Remove the record from Dime.Scheduler.
--help Display this help screen.
--version Display version information.
Locking with data
When you update an appointment from the back-office application to Dime.Scheduler, you can change the indicators. Every modification will be reflected immediately in Dime.Scheduler, thus enforcing the data-driven mechanism to reevaluate. It is therefore easy to create an indicator such as 'Locked' and assign it to a limited group of authorized users, so the appointment won't accidently be updated without permission.