>I have a form based on the CBizObjMaintenanceForm.
>On this a BizObj with a view that is a SQL join between my employee and zipcodes table.
>In the employee table the foreign key to the zipcodes table is stored.
>Because I want to show the zipcode as well as the city for the employee in the CGrisList, I have the view created like this.
>This as well leaves the possibility of ordering on the zipcode or city and I don't have to care about setting relations.
>Which leaves it all less fox related.
>
>But now when changes are made for the employee's localization.
>Change either the zipcode or city the foreign key of the zipcode table is changed in my employee table.
>But when I return to the grid, these changes (new zipcode/city) aren't reflected in the view because it is not requeried.
>
>I already tried putting it in the page1.Activate() but this is really overkill and from time to time not working properly.
>Then I tried to do the EmployeeBizObj::Requery() from within its PostSaveHook() but no luck there because the save is included within a transaction.
>
>Any suggestions.
Yves,
In the original Codebook, in the save of the invoice (just an example)
IF CURSORGETPROP("SOURCETYPE") <> DB_SRCTABLE
*-- Update the view's nInvoiceTotal field. This is field
*-- is a calculated field in the view, so no updates will
*-- be done to the back end.
REPLACE ninvoicetotal with this.oChildBizObj.GetTotal()
ENDIF
So what I do now is something similar in the hook that comes just after the save. So when going to the list, the changes are reflected in the grid without the need to requery anything.
José