Form Level Error Message

KSK

KSK

Well Known Member
Hi ,

We are migrating from XE to E91 . I found a issue with form level error messages form XE to E91 as below.

I have a Headerless Detail form having form level error message , when the user clicks on OK button in XE .The Headerless derail form is NOT getting closed in XE because of error messages in the application.
In E91 . The application is getting closed when we are having form level error message and if the error message is there in any particular field then only the form is not getting closed.

Do we have any system function or any standard BSFN to count no of form level error messages ....so i can use them in the "OK" Button clicked event to validate the form.


Thanks,
 
Hi ..

I tried with GetErrorCount and GetSystemErrorCount Business function to count the form level error messages from OK button but the business function are not giving the count of form level error messages. Always getting ZERO count from the output variables...
 
Both of these use the underlying API jdeErrorGetCountEx. At some point the behavior of this changed slightly. I noticed it when we did our upgrade from to Xe to 9.0. The behavior I am about to describe is probably very TR dependent but it is what I have seen on every TR release since we moved to 8.xxx back in 2009 from Xe.

Basically if you call a BSFN that implements this API like GetErrorCount directly from an APPL as the top level call it will always return zero even if you have errors showing on the form. However, if you call this function (or the API jdeErrorGetCountEx) from within a function it will return any errors that are on the error stack from other BSFN calls made by that function. I am probably not describing this very well so, lets say that F4211FSBeginDoc throws an error or one of the functions it calls throws an error.

The following will not return errors.
Code:
P4210
	F4211FSBeginDoc 	(throws error)
	GetErrorCount   	(returns zero errors)


However, if you have the following:
Code:
P4210
	MyF4211FSBeginDocWrapper	
		F4211FSBeginDoc			(throws error)
		GetErrorCount			(returns 1 or the number of errors thrown)


Note also that you don't have this problem in UBEs (at least under the TR we use):

So the following works as expected:
Code:
R5642001
	F4211FSBeginDoc 	(throws error)
	GetErrorCount   	(returns 1 or the number of errors thrown)



Also note that other error APIs like jdeErrorGetNextDDItemNameInfoEx have the same issues. Basically, after a BSFN call is returned to the calling APPL, the error stack information is no longer "visible" to the JDE C API calls.
 
Back
Top