cancel
Showing results for 
Search instead for 
Did you mean: 

How to make dynamic metadata property based on value

craig_michael_n
Champ on-the-rise
Champ on-the-rise
I am working on a custom content model that has a property of document status. The allowed values are Pending, approved, paid, exported.

When a document is uploaded the document is automatically marked as pending and the user can mark it as approved.

There is a script that runs nightly that will export the metadata to a third party system and mark it as Exported.

My question is how can I make it so that a user can only mark the document as pending or approved But they can not change it after it has been marked as exported or paid.

Any answers will be much appreciated.
1 REPLY 1

mlagneaux
Champ on-the-rise
Champ on-the-rise
Hi,

I've done something similar in Explorer some time ago. In my case, changing the content of a document had to depend on its status (modification was only possible in draft status).
My solution uses Dynamic Authority and custom permissions definition. It works well but I had to change a lot of things.

In your case, perhaps the best way is to use a Java based constraint. I've never used that so i don't know if the list of allowed value can depend on the node you want to change the property on.

Here are some links that can help you:
https://wiki.alfresco.com/wiki/Content_Model_Constraints
https://forums.alfresco.com/forum/developer-discussions/repository-services/custom-constraint-032620...

Hope this help !