trchandra
1st March 2002, 22:59
Hi,

I created a new Menu and attached it to a field on a form. When I run the session and try to zoom from that field, I am getting error message saying that "cannot open menu 'mtdsls0000901'".

I compiled the menu and am able to see the menu when run from "Run Program", but I am not able to zoom to this menu.

Do I need to do anything else to get this menu in zoom?

regs

shah_bs
1st March 2002, 23:26
The first reason that comes to mind is as follows:
- the menu has been developed in the (say) 'dev' Package VRC.
- the form of the field that you attached it to is in the (grand) parent Package VRC of 'dev'.

You would need to also copy the form, that you are attempting to attach the menu to, to the same Package VRC as where the new menu is sitting.

I cannot think of any other reasons right now.

trchandra
1st March 2002, 23:38
But all the components (form, session, menu...etc) are in dev VRC. Infact when I linked some other existing Menu it did work! It is not working for newly created menu.

NPRao
2nd March 2002, 00:11
Hi Ravi,

I dont know which baan version you are working or which option are you using to activate the menu.

Please try to use this in your code -

string zoom.to$( string process(14), long zoomcode, string zoomname(18), string returnfld(18), long formpos )

Description

Use this to zoom to another session or menu.

Arguments

process Specifies the name of the session or menu that must be started.
zoomcode This can be either Z.MENU or Z.SESSION, depending on whether it is a menu or session that is being started.
zoomname The name of the calling process. This is used in the zoom.from sections in the called process. If no name is provided here, zoom.from sections in the child session are not executed.
returnfld Indicates the name of the variable to be returned by the function. It must be the name of a variable in the called process. If an empty string is specified here, the function returns the exit value of the zoom process. If the argument is not filled, the function returns nothing.
formpos Specifies the form position for displaying the window. The default is 0
Note

This function is supported for backward compatibility only. In new applications, use start.session() instead.

Return value

The variable specified in the returnfld argument.

Context

Bshell function.
Use this function only in combination with the standard program.

trchandra
2nd March 2002, 00:29
Hi Prashant,

Thanks for the info.
Let me explain the scenario. I have a field on the form called "Order" and I want to provide user the option to zoom to Purchase Order or Sales Order. So I thought I can create a menu with both sessions and link that menu in zoom for the field.

When I have zoom option, why should I use zoom.to$() and handle the return field and put it in form field?

regs

NPRao
2nd March 2002, 00:45
Hi Ravi,

I have tested out your case. I attached a menu to a field where I am zooming. And it worked fine to me!

I think you should check your menu code, edit the form field with the DFE to zoom tab and check if its zooming to a Menu.

Dump the form/session and menu.

You should get it!!!

shah_bs
2nd March 2002, 02:39
Can you check if you have specified the menu sequence number when you attach the menu to the form field. It needs to be the same as the sequence number that you used to create the menu (usually, 1).