Re: View data not updating

Author: Chester Friesen

Posted: 2004-07-15 at 02:53:28

Well, this might be crude, I don't know, but it seems to work.

In ainvoicelinebizobj.beforesave is this line-

this.adjustinventory()

ainvoiceline.adjustinventory looks like this-

SELECT v_invoiceline

SCAN

SELECT v_lineitems

LOCATE FOR v_lineitems.iid=v_invoiceline.ITEMID

IF v_invoiceline.backorder

*do replacements here - test code now

REPLACE v_lineitems.comments WITH "A BACKORDER"

ELSE

*do replacements here - test code now

REPLACE comments WITH "NOT BACKORDERED"

ENDIF

thisform.bolineitems.save() && Saves lineitems

ENDSCAN

RETURN

This is a way that it works, the save() in the aftersave() in main

bizobj would only save the last record in the scan-endscan routine. I

changed the bolineitems to optimistic row, it seemed to work with

table buffering also, though.

Would it be better if it could somehow be made to work in the main

bizobj aftersave() and I'm just not catching on how yet?

©2004 Chester Friesen