GC turns red w/ BSFN error when called from grid but not from PushButton

BOster

BOster

Legendary Poster
*sigh* Is this "working as designed"?

If I set an error inside of a BSFN i.e. jdeErrorSet(lpBhvrCom, lpVoid, IDERRszLocation_16, "500030B", (LPVOID)NULL);, and then I call that BSFN from a grid event or an event of a column on the grid, the error shows on the GC passed as a parameter into the BSFN (the GC turns red). However, if I take that same BSFN call and move it to a push button on the form and instead of calling the BSFN from the grid event, do a system func push button to call the push button event, the error still gets thrown, however, it is not "associated" with the GC that was passed in as a parameter. In other words, the GC does not turn red.



In other words, this works just fine:
=======================================================================
FORM: Recommit Inventory [HEADERLESS DETAIL] (W5642201C)
=======================================================================
CONTROL: GRIDCOL Lot Serial Number
EVENT: Col Exited & Changed - Inline
-----------------------------------------------------------------------
Acme Inv SO DeReCommit Edit Line
FI idSession -> idSession
"U" -> cActionCode
GC nIdx [HIDDEN] <> nIdx
GC Order Co <> szCompany
GC Order Number <> mnOrderNum
GC Or Ty <> szOrderType
GC Line Number <> mnLineNumber
UNDEFINED <> mnQty
GC Lot Serial Number <> szLot
GC Location <> szLocation
GC nState [HIDDEN] <- nState
UNDEFINED <- nRelatedIdx
UNDEFINED <- nSplitFlag
UNDEFINED <- mnOrderQty
UNDEFINED <- mnNetChangeAvailQty




This only half way works (the GC doesn't turn red):
=======================================================================
FORM: Recommit Inventory [HEADERLESS DETAIL] (W5642201C)
=======================================================================
CONTROL: GRIDCOL Lot Serial Number
EVENT: Col Exited & Changed - Inline
-----------------------------------------------------------------------
Press Button(FC CallEditLine)


=======================================================================
FORM: Recommit Inventory [HEADERLESS DETAIL] (W5642201C)
=======================================================================
CONTROL: BUTTON CallEditLine [HIDDEN]
EVENT: Button Clicked
-----------------------------------------------------------------------
Acme Inv SO DeReCommit Edit Line
FI idSession -> idSession
"U" -> cActionCode
GC nIdx [HIDDEN] <> nIdx
GC Order Co <> szCompany
GC Order Number <> mnOrderNum
GC Or Ty <> szOrderType
GC Line Number <> mnLineNumber
UNDEFINED <> mnQty
GC Lot Serial Number <> szLot
GC Location <> szLocation
GC nState [HIDDEN] <- nState
UNDEFINED <- nRelatedIdx
UNDEFINED <- nSplitFlag
UNDEFINED <- mnOrderQty
UNDEFINED <- mnNetChangeAvailQty
 
Hi Brian,

First of all, sorry, this is not an answer for your issue - though I can easily imagine, that "this works as designed"
crazy.gif


I just would like to know, have you faced another side-effect of this "behaviour" and/or warn you about this possible issue to:

- enter faulty value in a row to let your BSFN to throw the error
- go to another row and enter (change to) a right value to force the BSFN run again, which won't throw error in this case

My question is: does the error remain on the form or does it disappear?

The second case is very problematical, because there is falty value on the form in fact, but there is no error on form, so OK processing is possible.

Regards,

Zoltán
 
Well the biggest problem I found (asside from the offending grid cell not being red) was that if Line 1 and Line 2 had the error and the user fixes line 1, it completely clears the error instead of leaving it for line 2. Or at least that is what it appeared to do... in all honesty, the error handling just became a little unpredictable.

The reason for calling the BSFN from a push button (should be obvious), is that because I needed to call the exact same code from multiple grid columns. I ended up having a CallEditLinePre and a CallEditLinePost push button so my code on each GC event went from:

PushButton(CallEditLine)

to

PushButton(CallEditLinePre)
BSFNCall
PushButton(CallEditLinePost)


Once the BSFN was called from something on the grid, errors set inside of the BSFN correctly showed up in the proper grid row/column.

Was able to reuse a little code in multiple places, but if I need to change a param passed into the BSFN I now have to go to 4 or 5 places to change it instead of just one... it gets a litte frustrating sometimes dealing with JDEs half-baked tools...
 
Back
Top