Actually, I did use the onSaveNew and I do have AutoPopulatePK=True.

I set the AutoPopulatePK in the afterInit. Should I place is somewhere else?



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Ed Leafe
Sent: Monday, April 16, 2007 11:32 AM
To: Dabo Users list
Subject: Re: [dabo-users] Can we retrieve the new pk in the app?

On Apr 16, 2007, at 10:58 AM, <[EMAIL PROTECTED]> wrote:

> We need to generate and save a field value with a unique number,  
> part of
> which we would like to be the actual pk of the record.  For example...
>
> yynnnnn-xxx-xxx-xx
>
> where nnnnn is the pk id.
>
> I looked adding the code in the afterSave using the getPK, but  
> getPK shows
> the temp number.  Is the new (real) pk available to me?

        If you are using AutoPopulatePK, the PK value should definitely have

already been retrieved from the backend by the time that afterSave()  
fires. Also, if this action is only applicable when saving new  
records, the onSaveNew() method is the place for this code.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




[excessive quoting removed by server]

_______________________________________________
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/dabo-users/!&!AAAAAAAAAAAYAAAAAAAAAGnwNn52Lj1DjDRaSGJwREHCgAAAEAAAAD3GtC/[EMAIL
 PROTECTED]

Reply via email to