Roger Blanchard
447 posts
Registered:
29 Jun 2018
13 May 2021
Link to this post
Should the before buffer field values be the same in the ModifyBeginTrans and ModifyEndTrans methods?
The reason I am asking is I just noticed for one of our BE that the before values are changing to the after values in the ModifyEndTrans. It appears it has something to do with the ReceiveData method in the BE.
If I comment the updating the eOrderLine.ItemDescrpt then the values in the BeginTrans and EndTrans are the same.
/*------------------------------------------------------------------------------
Purpose: Provides a hook to modify data in the ProDataset after Read and
Update operations (i.e. population of aggregated values)
Notes: Invoked during FetchData () and SaveChanges ()
------------------------------------------------------------------------------*/
METHOD OVERRIDE PUBLIC VOID ReceiveData ():
/* Roger Blanchard / Osprey Retail Systems May 13, 2021
I had to add a JOIN to the Item table to populate this as updating
the eOrderLine table here appears to cause the before table values
to be different in the ModifyEndTrans
*/
/*
FOR EACH eOrderLine:
IF eOrderLine.ItemDescrpt EQ "" THEN
FOR FIRST ITEM NO-LOCK WHERE Item.ItemNum = eOrderLine.ItemNum
AND ITEM.PackNum = eOrderLine.PackNum:
eOrderLine.ItemDescrpt = Item.Descrpt.
END.
END.
*/
@GeneratedCalculatedFieldsStart.
FOR EACH eOrder ON ERROR UNDO, THROW:
ASSIGN eOrder.OrderStatus = (Osprey.Util.Enum.EcommerceOrderStatEnum:GetEnum(eOrder.Stat):ToString()) .
END.
@GeneratedCalculatedFieldsEnd.
END METHOD.
Last modified on 13 May 2021 18:05 by Roger Blanchard