Am Donnerstag, 28. August 2008 23:22:03 schrieb John Aherne:
> The problem I have with the step by step guide is that it implies I can
> save a record from the hours screen without having to change anything in
> code. It says that setting valueMode = 'Key' will make the backend save
> the record using the clientfk and not the name in the dropdownlist.The
> datasource property for the dropdownlist is the clientfk field. However,
> the database complains that it is using the name to go into a integer
> field.
>
> Do I have to handle this myself somewhere or am I overlooking something.
>

This is quite strange. You are sure that nowhere in the getClients() method of 
the Hours bizobj or in the afterInit() method of the dropdown list the fields 
from the Clients table ("clientname" and "pkid") have changed places by 
mistake? Because that would give exactly the error you described, I think.

> Does anyone else get this problem when doing the Step by Step guide.
>
> Another point about the guide. It chooses to add the clients.clientname
> to the Hours bizobj. If this is left in when I try to make the save it
> thinks this field is part of the hours table and errors with a fieldname
> not present in the table. I just comment it out and the problem is cleared.
>

You can set
        self.NonUpdateFields = ["clientname"]
in BizHours.initProperties(), then it works. That was the answer I got to the 
same question (http://leafe.com/archives/showFullThd/395297#0).

Something else: the "summary" page of the Hours form only shows the newly 
entered records and doesn't show the client name. Adding 

def onPageEnter(self, evt):
        self.Form.requery()

for this page helps.

And now of course we'd like to know what controls should go to the bottom slot 
of the summary page and what they should do.

Sibylle

-- 
Dr. Sibylle Koczian


_______________________________________________
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]

Reply via email to