New and update form application - missing parameter

I want an application which will start with new form. But When you come with grid application to edit, it will start with update.

so, I did
if(empty([id]){
sc_apl_conf(“form_myapp”,“start”,“new”);
}

When you come with grid application it works. But When you go directly to the form application (new record), it needs id parameter to start. How can I fix this?

Any help will be appreciated.

Re: New and update form application - missing parameter

Hi,
it should work fine if you put it in the onApplicationInit-event. I use it all the time but you may also try the procedure described in this article.

http://www.netmake.com.br/knowledge/article-10.html

Hope this helps

jsb

Re: New and update form application - missing parameter

If I do so, I can’t use the application for update record.

I want:
if I go to application from menu > start new record
if I go from grid to update > start update record screen.

Re: New and update form application - missing parameter

OK.
Then you either define a SESSION variable for your id or you put [id]=""; in the onExecute event of the menu.

jsb

Re: New and update form application - missing parameter

It worked!
Thank you very much :slight_smile: