I'm trying to set a date-field of a new Component automatically when created, using the event system.

The approach is to set the field in the GetInstanceDataEvent

 public Events()
     EventSystem.Subscribe<Component, GetInstanceDataEventArgs>(HandlerforComponentGetInstance, EventPhases.TransactionCommitted);

And the function to update the field:

private void HandlerforComponentGetInstance(Component comp, GetInstanceDataEventArgs compGetIniEventArgs, EventPhases eventPhases)
    throw new Exception("-------THE EVENT IS TRIGGERED------------");

But the trace is never logged. I've tryed changing the eventphase to "initiated" but the result is the same. I restarted COM+ and the required services, and I've working other events perfectly, but this is never triggered when I create a new Component and select the Schema.

What is the correct use for this event?

1 Answer 1


The GetInstanceData action/event is triggered on a Schema, not on a Component.

  • Right, using Schema despite Component does the job. Aug 9, 2017 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.