Error through C...

Cleiton Santos

Member
Does anyone knows how can I set a error message on control in the form? I need do this through the C... I have a Business Function to validate some values... If the user input wrong value I need put the control in red and set the error... But the Business need set the error... I can't set the error with "set control error" 'cause I'm using Error message with description.

Best regards,
Cleiton
 
Cleiton,
It seems you want to Error on a field by setting error from a C function?. If yes then you can do it using jdeErrorSet in which third parameter will be the field ID you want to set the error on.
Hope this helps.

Chan
 
As Chan pointed out, use the jdeErrorSet api to do what you want. I thought I'd elaborate a bit on his post. He refers to the "field ID" as the 3rd parameter...what he means here is one of the constants that is defined in your business function DSTR. It will look something like this in the DSTR typedef:

#define IDERRxxxxxxxxxxxxx_1 1L

There will be one of these for every data structure parameter and that is what you need to pass as the 3rd parameter to jdeErrorSet.
 
first you need to create Error message then you need to use SetErrorMessage Buniness funtion
 
Back
Top Bottom