How to disable the Lock button using a method during a Form OnLoad event
- 6 years ago
Hi Phinnix,
This kind of dynamic Permission model is already built into Aras Innovator without needing to add any custom logic or relationships. There are two system Identities called Owner and Manager that correspond to the identities set as an item's owned_by_id or managed_by_id. Any permissions given to the Owner Identity will be given to any Identity set as an item's owned_by_id. The same holds true for the Manager identity and the managed_by_id property.
I'd recommend doing the following:
- Add fields for the owned_by_id and managed_by_id properties to the Form of the List ItemType
- Update the Permission of the List ItemType to give Edit permissions to the Owner and Manager identities
- Go to your "Available Design Materials" list item and set "Metal Work Management" as the owned_by_id
- Go to your "Design Shapes" list item and set "Design Department Administration" as the owned_by_id
- Confirm that the permissions work as expected
This is a more flexible solution as it also ensures the same permissions are true even if the request comes from outside the client (maybe a future external app you use will have functionality to add values to Lists). More importantly, this also saves you the hassle of needing to write this functionality yourself. :)
Chris
Christopher Gillis
Aras Labs Software Engineer