I have created the MetaClass and added a UI for it in CommerceManager, I can add new objects but I need to set default values to some of the string properties. For instance, I want to set the current user name for the property CreatedBy.
My idea to do this is by using MetaClass triggers, but I can't get them to fire.
I have managed to create and added the trigger to the MetaClass, see the included meta information taken from the column mcmd_MetaClass.XSAttributes for my custom MetaClass:
I have created the MetaClass and added a UI for it in CommerceManager, I can add new objects but I need to set default values to some of the string properties.
Triggers
Mediachase.BusinessFoundation.Data.Meta.Management.Trigger[], Mediachase.BusinessFoundation.Data
trg_SetDefaultValues
true
true
true
TriggerAction
TriggerAction
For instance, I want to set the current user name for the property CreatedBy.
My idea to do this is by using MetaClass triggers, but I can't get them to fire.
I have managed to create and added the trigger to the MetaClass, see the included meta information taken from the column mcmd_MetaClass.XSAttributes for my custom MetaClass:
My MetaClass contains a public method named TriggerAction but it is never called.
What am I doing wrong?
Is there any example code on how to use MetaClass triggers?