Forcing a Row Exit and Changed inside of while loop that changes Grid Values

PAULETA_PT

Member
Hello to All,
I already read some posts in the forum with similar problems and i tried all the solutions but none of them works.
Version E811.

Quick explanation:

When a user enters a article , based in some rules , if that article is a parent i will insert new lines on the grid with the Son's. This code is in row exit and changed async and is working perfectly.

My problem is when the user change the quantity of the parent i have to Re Calculate the quantity of all the sons. In row exit and changed async i'm pressing a button ( Recalculate Son's quantity).

The logic of the button is simple:

VA frm_55_LineFather = GC LineNumber
VA frm_55_LineString = [GC LineNumber]
VA frm_55_Identifier2ndItemFATHER = GC ItemNumber.
VA frm_55_QuantityFatherLine = GC QuantityOrdered
//
//
Get Max Grid Rows(FC Grid, VA frm_55_MaxRows)
VA frm_55_NumRow = "1"
While VA frm_55_NumRow is less than VA frm_55_MaxRows
Get Grid Row(FC Grid, VA frm_55_NumRow)
//
If GC LineFather Son is equal to VA frm_55_LineString And GC FatherSon is equal to "2"
//
VA frm_55_IdentifierShortItem = ""
F4101.Fetch Single
F5530022.Fetch Single
GC QuantityOrdered = [VA frm_55_QuantityFatherLine]*[VA frm_55_QuantitySon]
//
End If
//
VA frm_55_NumRow = [VA frm_55_NumRow]+1
End While


After the button is clicked the Quantity Ordered of the sons's are correctly Populated. My problem is that row exit and changed async is not running and Gc quantity Shipped is not being Re calculated. In my thoughts when the user click on OK button the event should Run to all the lines that have changes but this is not happening and i'm recieving an error " Quantities Must Balance".

The ideal is that row exit changed asyns TRIGGER for every line changed after or inside the button click to user can see Quantity Shipped recalculated.

Is there any way to do this? It makes sense to me if a grid value changes ( In this GC Quantity Ordered) this event should occur.

Any Help would be appreciated
 
Back
Top