Ed Leafe wrote:
>> I uncomment the DefaultValues line
>> Existing records call validateRecord fine
>> I call the new method on the bizobj and try to save the new record
>> validateRecord never is called on save
>>
>
> Did you actually change anything in that new record? All that
> DefaultValues does is populate fields with values other than the default
> "blank" value for the data type. The 'snapshot' that determines if a record
> has changed is taken *after* DefaultValues has been applied.
>
>
Nevermind, I did change something.
>> If I comment the line out again and run my app, the validateRecord
>> method fires for both new and existing records.
>>
>
>
> Is the new record saved in the first case? IOW, does Dabo think that it
> is a changed record
>
Ok, so to add some more info to this, I tried setting SaveNewUnchanged
to True. When I set it to True, isChanged on the bizobj is still
returning False. I did a little more digging and when the bizobj
isChanged method calls the current cursor's isChanged method,
includeNewUnchanged is passed as True. The _newRecords dic on the
cursor has a value of {-1:None}, and as a result the cursor's isChanged
method is returning None because that is what's in the value for the
_newRecords dic.
Regards,
Nate
_______________________________________________
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]