OnSaveComplete - Determine if new?

Posts   
 
    
ianvink
User
Posts: 394
Joined: 15-Dec-2006
# Posted on: 17-Jan-2007 02:27:42   

After an entity has completed saving in the OnSaveComplete() event, how can I tell if the object was created or updated in that save?

Ian

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 17-Jan-2007 07:27:17   

I think it would be too late to know.

Why don't you use OnSave() event (an event that occurs before the save)?

ianvink
User
Posts: 394
Joined: 15-Dec-2006
# Posted on: 17-Jan-2007 07:31:05   

I need to do something after the time is in the DB, but only when it's known to be new.

I'll just call the code after I call the entity.Save() in the calling code.