This content has been marked as final. Show 2 replies
Have a look at [url http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_error.htm#BGBEEGIB]apex_error.add_error.
Add_error registers a error as if it was a normal validation.
Giving you the option of logging multiple validation errors using one validation.
Nicolette - That looks like exactly what I am looking for, thanks! Need to read up on all the new APIs introduced in 4.2. As always, the APEX team has done a fantastic job of crafting well-designed, easy to use APIs.
The add_error Signature 2 should do what I need. Seems to work fine, just put the code in a after-submit before-validation process and the end result is identical to the out-of-the-box not-null validation.
[Slight inconvenience is that the out-of-the-box validation's error message lets us use the #LABEL# substitution string. But in a custom process using apex_error, I guess one could pluck the label from the APEX_APPLICATION_PAGE_ITEM dictionary view and use that in the apex_error.add_error.p_message parameter]
Thanks for your help.