OnApplicationInit Error

if i try to use sc_lookup onApplicationInit:

sc_lookup(excel," SELECT id , email FROM jos_users
WHERE id =’[idpdv]’");

{email} = {excel[0][1]};

if (substr ({email}, 0,2) == ‘L#’)
{
$disabilita = ‘1’;
}

Fatal error: Call to a member function Execute() on a non-object in C:Programmi
etmakev5wwwrootscriptcaseapp est…
on line 203

Re: OnApplicationInit Error

Sir try to use this code in event onScriptInit please.

Re: OnApplicationInit Error

Same problem

Re: OnApplicationInit Error

Please, use {email} = ({excel}[0][1]);

Re: OnApplicationInit Error

same error

there is a bug in the menu.

Re: OnApplicationInit Error

This is by “design” … You can’t use sc_lookup in Menu-Events (see WebHelp => ScriptCase Macros / Events x Applications).

A bug is this:

$test = "hello"; 

in Menu -> Events -> onScriptInit. Generate Source and this error is shown:

Fatal error: Call to undefined function nm_log_entry()

Re: OnApplicationInit Error

This is really a bug, we already know about it and it will be fixed in next release.

Re: OnApplicationInit Error

its already fixed. will be released soon.