I need to add some code when opening a record in edit mode so I have overwritten the method "openRecord" in the section Schema. When I open the record from the List view, the method does execute but from the Dashboard view it is not.
Does a different method execute when opening the record from the Dashboard view? In that case I would like to know which method is executed in order to overwrite it.
If I understand your task correctly, you need to use the method onEntityInitialized. An example of this you can find in this article, there when the page is opened we fill in the value for some field.
The problem is that before opening the record, I need to execute a business process in which the record permissions are modified. I have tried to add it on the onEntityInitialized but as the record is already openned, the permissions cannot be modified.
If I understand your task, when you open a page you want to run a process that will modify the rights to this page, and if the user doesn't have that anymore, the page will not open. If init didn't work I recommend you to write a business process that will run periodically and will update access rights to records without needing to do it every time someone tries to open a page.