On Friday 19 September 2008 12:01:46 am Uwe Grauer wrote: > johnf wrote: > > Hi, > > It seems that I'm always do something like the following in my Bizobj's > > > > > > def beforeSave(self): > > """Need a flag to tell me if I am adding a new arcust record for > > afterSave""" self.flag_IsAdding=self.IsAdding > > > > > > def afterSave(self): > > If self.flag_IsAdding: > > do something. > > > > The reason for this is I need to do something only after a completed save > > and if the record was new. Is there a better way? > > I do not know which "something" you have to do on a completed save. > So i do not know if the following would help: > I use triggers (in this case "after insert") for this kind of thing. > Together with a transactional database this method should work for you > too depending on you "something" you have to do. > > Uwe
Yes many times a trigger can help. In this case it would not. The something has nothing to do with data. It was needed to send an email. It's true that emails can be sent from the database. But the client does not want that to happen. But that's not the only time I had the need. I was just wondering about the general approach. -- John Fabiani _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]
