Custom Error

Hello

how can I can raise a custom error by javascript on the server side?

thank you for you response :slight_smile:

Nina

Subject: Try this…

Store your error message in a sessionScope variable and then before processing any other ss code, check that variable in an action group. If it’s blank (i.e. no error msg), process the rest of your code.

On your xpage, use a computedfield control bound to that sessionScope variable, visible if the variable isn’t blank. When the code runs, it will stop on an error and the computed field will show your custom error text.

hth

Bob

Subject: Custom Error

Thank You Bob

Also I want to associate that error with a Display Error control that is why I need a real error, or how can I do that?

tnx

Subject: hmm… Not sure about that…

I don’t know how you would generate an error yourself to show in the error control - or even if it’s possible. Sounds like something I might want to do myself someday, though, so I hope you find a solution and post it!

Good luck