sc_apl_conf("my_form", "start", "new"); + AJAX not working

I am using the sc_apl_conf(“my_form”, “start”, “new”); onAplicationInit to star my form on a new record.

I am using the ajax event on change to update a Select value on this form and is not working, however when i remove de sc_apl_conf(“my_form”, “start”, “new”); and click on the new record button the ajax events work just perfect and my Select fields reload excelente.

Any ideas why is this happening?

PS. The reload form does not work either couse when it reloads sets a new record and erases all the data.

I’m having the same problem.

Onchange is an ajax event which needs to occur on the webform. That’s why a click in the form works as expected. However, if you use the macro then this applies to the server side. It loads a webpage with new as initials state. That’s something different imho.

Hello,

On form applications you should only use sc_apl_conf on onApplicationInit() or onScriptInit().

Also notice that: "This macro must be used by one application to modify the properties of another application.

http://downloads.scriptcase.com.br/downloads/v7/manual/en_us/webhelp/manual_mp/28-Macros/00-macros_sc.htm#sc_apl_conf

regards,
Bernhard Bernsmann

My friend, the event onAplicationInit put this code:

if(!isset($_POST[“start”])) {
sc_apl_conf($this->nm_cod_apl, “start”, “new”);
sc_redir(
$this->nm_cod_apl,
start=true,
“_SELF”
);
}