sc_exit macro doesn't work

Hi all,

I have a grid application which is called by a menu. When the grid application starts, it checks some conditions to ensure it can be run or not.

I tried to use sc_exit in the OnScriptInit event for the case it fails the checking.

However, I found the sc_exit(ok) macro doesn’t work.

Please help, thanks

You should use sc_redir here. sc_exit is not valid for grids, see manual.

Hi,

I found both sc_message or sc_error_message macro cannot work in OnScriptInit event of grid application.

What macro I can use for displaying an error message ?

thanks again

In the onscriptinit there is no interaction to the client so you simply cannot do this in this event. The only thing i can think of is to create an error message form/control app and then set an errormessage to a global and then sc_redir to this error message form that displays this global.