sc_btn_display (‘new’, ‘off’) doesn’t work in production, if it works in development!.
My code with verification of how it passes through the IF (in onScriptInit event) :
if ([priv_admin_session])
{
sc_btn_display ('new', 'on');
echo 'yes';
} else {
sc_btn_display ('new', 'off');
echo 'no';
}
Checked with ‘echo’, it correctly goes through where it has to go depending on the true - false value of the global variable [priv_admin_session]. If [priv_admin_session] = true display ‘yes’, if [priv_admin_session] = ‘false’ display ‘no’. But sc_btn_display (‘new’, ‘on’) and sc_btn_display (‘new’, ‘off’) do not work.
The project is implemented with the security module, where in the onValidate event of the Login control the Global variable is set depending on whether the user is privileged or not: [priv_admin_session] = ({rs [0] [0]} == 'Y ')? TRUE: FALSE.
Greetings