Hi, I have a query on how to make the records of an entity read-only (they cannot be edited by any user) after 1 year of creating them. I appreciate any contribution.
Announcement
Collapse
No announcement yet.
Read-only records after some time of creating them
Collapse
X
-
I am not sure but maybe you can do the magic in the entityDefs json
You can find the json of the entityDef in /custom/Espo/Custom/Resources/metadata/entityDefs
How to use if statement inside JSON Here is the code: ....................................................................................... var config = [ { ...
But I am not sure if you can modify readOnly attribute for all the fields..
-
Hi jgarcia,
There is a workaround, the installed Advanced Pack extension is required:
1. Create "Access to entity name" team and assign it to all users (via Mass Update).
2. Bind this team to all records of the entity name type (via Mass Update).
3. Change the Role for all users so that access to editing the entity name records was only of the team type.
4. Create report with entity name Target Entity with filter Created At greater than one year.
5. Create a Workflow with:- Target Entity: entity name
- Trigger Type: Scheduled
- Target Report: the report created in step 4
- Scheduling: 0 0 * * *
- Action:
(instead of Opportunity choose entity name; in the formula, replace the team-id with the id of the created team in step 2)
Thus, the team should be removed from the record after it is one year old, and users will have read-only access to records of entity name type.
- Likes 2
Comment
Comment