You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

We need to add the script to handle the Align button's click event  (F24 key).
Select the script of ORD_MAINT – note the name FORMSCRIPT_9 may be different in your system:

Locate the vHandle_BUTTONCLICK: function(sButton) script block.
Add the JavaScript code to handle a click on the Align button.
           case KeyF24:
                 /* Signal this event and pass additional information  */
                 AVSIGNALEVENT("CUS_MAINT_ALIGN","FRAMEWORK",objListManager.NKey2[0],GETVALUE("ADDRESS"),GETVALUE("CITY"),GETVALUE("POSTALCODE"));
 
AVSIGNALEVENT is a RAMP API that allows you to broadcast an event across active RAMP screens and active Framework filters. For more information please refer to [<span style="color: #0000ee"><span style="text-decoration: underline; ">AVSIGNALEVENT Function</span></span>].
Since the only keys allowed in this screen are Enter and F24, you can delete the other case statements so that the entire SWITCH block looks like this:
switch (sButton)
        {
           case KeyEnter:
                 SENDKEY(KeyEnter);
                 break;
           case KeyF24:
                 /* Signal this event and pass additional information  */
                 AVSIGNALEVENT("CUS_MAINT_ALIGN","FRAMEWORK",objListManager.NKey2[0],GETVALUE("ADDRESS"),GETVALUE("CITY"),GETVALUE("POSTALCODE"));
                 break;
              default:
                 SENDKEY(sButton);
                 break;
        }
 
[<span style="color: #0000ee"><span style="text-decoration: underline; ">Show Contents List</span></span>|../../index.htm#lansa/tutorial08_0020.htm]

  • No labels