Hi all,
Can anyone shed some light on a way to handle this usecase.
The user logs in and the default state of one of the menu items (item_37) is disabled. The code in the menu application’s onApplicationInit is simply:
if (empty([srv_id])) {
sc_menu_disable(item_37);
}
else {
sc_reset_menu_disable();
}
No problem at this time (see pic)
Next, when the user selects the “Open Blueprint” menu item it redirects to a grid application where they can select a record (see pic)
When the user selects a record (link) they go to a form application and it is at this time that I set the global variable [srv_id]. Now, it’s also at this time I want to change the “Close Blueprint” (menu item_37) to enabled so I have tired using the same code logic on the form application’s onApplicationInit but it results in a script error (see below).
Fatal error: Uncaught Error: Call to undefined function sc_reset_menu_disable() in C:\Program Files (x86)\NetMake\v9-php73\wwwroot\scriptcase\app\e360SDB\form_update_service_design\form_update_service_design_apl.php:467 Stack trace: #0 C:\Program Files (x86)\NetMake\v9-php73\wwwroot\scriptcase\app\e360SDB\form_update_service_design\form_update_service_design_apl.php(1255): form_update_service_design_apl->ini_controle() #1 C:\Program Files (x86)\NetMake\v9-php73\wwwroot\scriptcase\app\e360SDB\form_update_service_design\index.php(2353): form_update_service_design_apl->controle() #2 {main} thrown in C:\Program Files (x86)\NetMake\v9-php73\wwwroot\scriptcase\app\e360SDB\form_update_service_design\form_update_service_design_apl.php on line 467
It’s obvious to me that I can’t reference the menu item or sc_reset_menu_disable(); in another application other than from within the menu application. Is that correct? If so, does anyone have any suggestion on a work around for this business logic?
Thanks muchly in advance