Set a Grid Column Error via C BSFN.


Active Member

I have successfully added Form Control errors using "jdeSetGBRErrorText", but am now looking to add errors at the Grid Row Column level. Can someone point me in the right direction? Again, I would love to do this through a custom C BSFN.

Thank you,
Hi fvlmasl2,

You can probably use jdeSetGBRError like jdeSetGBRError(lpBhvrCom, lpVoid, IDERRszCostcenter_5, _J("0052"));
You should probably always use jdeErrorSet. It will work for both form controls and grid cells as long as the FC/GC is passed in on the parameter ID where the error is set and CALLMAP is set correctly (if the BSFN throwing the error is further down on the call stack).
It is in the null pointer test of the generated code for every C BSFN.
I'm confused as to where\how I tie the GC to the parameter in the BSFN.
jdeErrorSet(lpBhvrCom, lpVoid, IDERRmnAmountGross_2, _J("500LBE29"), (LPVOID) NULL);

In this example the error will be "bound" to what ever form control (FC variable) or grid cell (GC variable) is passed into the BSFN parameter mnAmountGross in ER code. For a grid cell this is the GC variable you pass into the BSFN in ER code. When it comes to grid cells, the only thing you have to be careful about is what event the BSFN is called from - it won't work correctly from just any form event the way an error bound to an FC variable will. In general it has to be on a grid row[xxxxx] event or grid column[xxxxx] event and NOT on a push button event for example. Most common event for a grid cell would be on the row exited and changed or changed async event.
Thank you....I wasn't many irons in the fire I guess......

Again, thank you for the prompt replies.