I'm looking for a way to reinitialize a status attribute from validated to draft when a user modifies the object (eg the comment or any other attribute of the object). Any ideas on how this can be achieved?
Solved! Go to Solution.
I have found a way around this, here is what I did :
1. I created a new MetaAttribute format Date, attached a macro to it to have it as a calculated metaAttribute that receives the value of the Modification Date Attribute.
2.I created a MetaAttributeUpdateTool macro attached to my new date MetaAttribute where I reset the status to draft when it's validated.
Whenever a user now tries to modify the object, the modification date is updated which triggers the MetaAttributeUpdateTool because my MetaAttribute date is also updated. It checks the validation status and if it's validated it sets it back to draft.
Furthermore the same way of working seems to be possible to use to prevent users updating an object in certain conditions. If you make use of the ErrorMessage argument in the MetaAttributeUpdateTool, they seem to be unable to update the attibute.
I need to do some more testing but this seems to be the way to go. If you have any suggestions or think this might cause issues. Please let me know.
That's right, I have used this way to trigger an event on change events too.
Sometinme it is possible to use a Knowledge Rule with a code inside that is not (only) displaying informations but is modifying attributes or links in the current object or an object linked ...
I was indeed looking at your previous post of last year where you explained it with the rules but could not figure out how you triggered it. Today I saw the light