Custom Menus

Most of the pages in IFS Applications have predefined context menus. If the application users have need for additional actions to be performed in a window, the administrator can configure new actions to be available in the context menu. Each user can then decide if they want to use the standard menus, the ones configured by the administrator, or both. The choice is made per window, so it is possible to use standard menus in one window, and custom menus in another.

Contents

About Custom Menus

The Custom Menu are built by creating Custom Menu items. Each item belongs to a certain window, and more items can be configured on the same window. To create the items you follow the general procedure outlined in How to create a Custom Menu item

The name of the Custom Menu item can be defined for all the different languages that are used. Read more on How to make the Custom Menu item support different languages

To make certain that the new menu items are controllable from a security aspect, you will connect the items to Presentation Objects, the objects that are granted to users through the permission sets in IFS Solution Manager. If a connected Presentation Object is not in any permission set granted to the user, the Custom Menu item will not be presented at all.

The actions that can be performed by executing a Custom Menu item, includes possibilities to open other windows, running methods in the client application, performing actions in the server and starting other applications or pages. The Action Types define the actions, and for each Action Type you may add additional parameters. Note that in order to specify parameters correctly for the advanced Action Types you will need knowledge from the application source code. Read more About Action Types.

The menu items can, depending on action, reference data from the form window and use this in the action. An action that, for example, opens up a web page can be be configured to add data from the form to the URL address, read more about this in How to use form data in parameters

About Action Types

Possible actions for a custom menu item are:

Action Type Description Parameter
Create Window A new window will be opened. Name of the window to start. The name of a window can be found through that window’s Properties.
Create Window with Transfer As Create Window, but the keys from the current window will be passed to the destination window. If the destination window is prepared for data transfer, it will be populated with corresponding records.
(note: this option ONLY works if the form has been setup in the toolset to accept a transfer of information - be aware not every form is)
Name of the window to start. The name of a window can be found through that window’s Properties.
External Program Starts an external program. The external program to start. External Program Custom Menu Sample
PL/SQL Block Executes a PL/SQL block. The PL/SQL source code block to be executed. PLSQL Block Custom Menu Sample
Quick Report The Quick Report specified in the Parameter field will be executed. Name of the quick report to execute. Quick Report Custom Menu Sample
Report The Order Report dialog is opened and populated with the report specified in the Parameter field. Name of the report to execute. Report Custom Menu Sample
State Machine An event will be sent to the state machine for the LU associated with the form. The event name. All the valid events for a particular LU can be found in the object model.
URL Performs a navigate to the URL specified in the Parameter field. The program associated with the URL schema will be used for opening the URL. The URL to be opened. URL Custom Menu Sample
User Method The UserMethod() function in the window will be called. Provided that you know what code is written in the client, extra functionality can be made available to the new menu item. An identifier that will be passed to the UserMethod(). Knowledge of the internal structure of IFS Applications is needed in order to find  the correct identifier to use.
Separator A separator will be added to the menu.  

Window Descriptions

The management of the Custom Menu items are handled in Solution Manager/Configuration/Custom Menus. The detailed form, Custom Menu, is the place to create and edit the items. The overview supports searching and managing several items at once.

 

Field Descriptions

Field Description
Menu ID A generated unique identifier.
Description A short description about the custom menu.
Window

The window name where the menu item should be added to the pop-up menu. It is not the same as the window title. The window name can be found in Properties for that window (e.g. right mouse on the window, Properties, Window tab - Identity).  If the menu is to be connected to a child table, the name should be <window name>.<table name> (e.g. frmDemoOrder.tblItems). This information can also be found by right clicking on the child table and opening the Properties dialog as mentioned above.

Menu Text The title for the default language.
Action What this menu item will do. See the list of possible actions.
Menu Item Order The custom menu items will appear on the pop-up menu sorted by according to the order in this list
Presentation Object Used for granting access to a custom menu item. Only custom menu items with Presentation Objects that the user are granted too will be available in the pop-up menu.
Process The menu will appear only if the window has been started in one particular process. If the window is not a part of any process, specify NONE.
Ordering The custom menu items will appear on the pop-up menu sorted according to the order in this list
Condition The custom menu will be enabled for all objects the match the specified condition
Translations The menu titles for the different used languages
Application Configuration Package The name of the Application configuration package, if this custom menu is added to a package.

The action parameters is different depending on selected action type. The specific settings for each action type is described in the Custom Menu Samples.

How to create a Custom Menu Item

Menu items on a custom menu are created by creating new records in the New Custom Menu window

In most IFS forms an Context Menu is available to easily access other areas of the application and to review more detailed information.  If these menus do not correspond to the needs of the end user then it is possible to either switch off these menus or to add some customized items (the IFS Custom Menu option) to them.

Warning: There are some forms where the Custom Menu option either does not work or cannot transfer values across into the newly opened form.  Be aware of some limitations and always test the facility that you need first.

For example - the transfer of selected (highlighted) information in one Overview form does not carry forward to another overview form.  The best result is to set 'auto populate' in the second form ready for the user to enter a query direct.

In this example the Purchase Order Line form Operations Menu will enable a link to the Purchase Part form.

  1. Find out the name of the form where you want to add the Custom Menu.

    Use the context menu option Properties and note the form identity.

    tbwPurchaseOrderLinePart

  2. Custom Menus are enabled or disabled in the Properties of a form.  Just select or clear the Include Custom Items checkbox under Menu Configuration.   Press OK to save.
  3. Now find out the names of the forms that you want to include in the new Custom Menu for purchase order lines.  Simply open the forms and use Properties to view the form identity.

    frmPurchasePart

    frmSupplierPerPart

  4. Open Solution Manager\Configuration\Custom Objects\Menus\New Custom Menu window. 
    1. Add the following details:

      Window: Enter the window identity where you want to see the new   option - tbwPurchaseOrderLinePart

      Menu Text: The menu item text

      Action Type: Select an action type. For this example, 'Create Window With Transfer' (see more about Action Types)

      Process: Default is NONE
      Action Parameter:
      Enter the window to be accessed from the new custom menu option - frmPurchasePart
  5. Enter information in the Key Translation grid. 
    1. Key Translation : Enter the information that should be passed from one window to the other - the column name from the database table (in some windows the identity of a field may be different) either use the Advanced Query or Debug Console to find out. You can browse for the key columns for the form using by the options Browse Source Columns and Browse Destination Columns
  6. If the custom menu should only be enabled only for certain objects you can set a condition. Click on Edit Condition button and enter values that the object must match. For example for tbwPurchaseOrderLinePart you can specify what the MANUFACTURER_ID must be in order for the menu item to be enabled.

    Note: Not all the columns in the underlying view of the form are mapped to visible fields. As the custom menu condition dialog loads the list of columns directly through the view definition, there can be a subset of columns unbounded to fields in the form. Be aware of setting conditions for columns which are not included in the form through the conditional dialog, as this will result menu to be remain disabled.

  7. Enter menu titles for relevant languages in Translations grid.
  8. Save the record.
  9. Once the Custom Menu options are defined, log off the Application and then log on again to see the effect.

How to use form data in parameters

For menus with action type URL, PL/SQL Block and External Program it is possible to use field values in a form, and context substitution variables in the Parameter field. The values can be used as parameters in a URL, as bind variables in a PL/SQL block and as parameters to an external program. The syntax rule is #<context substitution variable># for context substitution variables and &<column name> for form fields. In URLs the form field parameter should be additionally enclosed in curly braces ({&<column name>}) .

Examples of usage:

  1. URL: http://www.myintranet.com/purchasingroutines.htm?company=#USER_COMPANY#&&site={&CONTRACT}

    Note:
    The syntax requires that the URL parameter AND operator must be defined with two && instead of a single &.
  2. URL: C:\My Files\My document.doc
    Opens the document with your normal program associated with .doc files.
  3. PL/SQL Block: BEGIN Purchase_Requisition_API.Create_Purchase_Order(&REQUISITION_NO, &SUPPLIER_ID, #TODAY#); END;
    The framework replaces the given substitution variables in the PLSQL block, with global bind variables containing the actual value.
  4. External Program: Productconf.exe &PART_NO
    Multiple form field parameters can be added, each separated by a space. E.g: Productconf.exe &PART_NO &REQUISITION_NO
    Other parameters can be included, separated by spaces. E.g: Productconf.exe &PART_NO &REQUISITION_NO "Other Parameter"
    Quotation marks are only necessary if there are whitespaces or special characters in the parameter text. Text enclosed in quotation marks will be considered as a single parameter.

To list the available field values for the form, right-click in the action parameters pane and select Show Source Columns. To list available context substitution variables, right-click in the action parameters pane and select Show Context Substitution Variables.

How to map keys from the source to the destination

If the action type is Create Window, the keys for the current record will be sent to the created window and it will be populated using those keys. If some other information than the keys should be sent, or if the keys are differently named in the destination window, the Key Translation table can be used to specify what information should be passed between the windows. Source Key Name is the name of the column from the source window. The value of the column will be sent to the destination window and interpreted there as Dest Key Name. Note that if you are using Key Translations, the keys will not be sent automatically, you will have to specify them if you want them to be sent as well. You can browse for the key columns for the form using by the options Browse Source Columns and Browse Destination Columns.

If the action type is Report or Quick Report Key the report parameters are registered in Key Translation. Source key name is the column name in window where you have the custom menu and Destination key name is the report parameter name. You can browse for the fields in the the form using by the option Browse Source Columns. For a report you can list the report parameters using the Browse Destination Columns option.

How to make the Custom Menu item support different languages

Each menu item (except separators) must have a menu text for every language that is going to be used. The menu texts are added in the Translations grid.
If you only have one language you can just enter the title in the Menu title field. This will automatically create a menu text in the grid for your current language. If the language you are using differs from the language you want to create menu text for as default. You can change the input language by right-clicking in the form and select Settings. Select the language you want as the default language when entering a menu title for new custom menus.

Column Description
Language Code What language the following texts are going to be used in (e.g. en for English)
Title The text that will appear on the context menu.

Export and Import Custom Menus

Custom Menus can be exported to the file system as an extra backup or to be able to import it in another installation of IFS Applications. The export format is xml.

How to Export Custom Menus

In the Custom Menus form select the custom menus that should be exported. Right-click and select Export Custom Menu. Browse for location where to export the file in the Save File Dialog, set a filename and click on Save. All the selected custom menus will be exported to this file. Single Custom Menus can be exported from the detail form. Right-Click in the form and select Export Custom Menu to open the same dialog to export the custom menu.

How to Import Custom Menus

In the Custom Menus form, there is an Import Custom Menu button in the form banner (where the save, query etc buttons are located). Click on this button and select a Custom Menu Export xml file from the file system. The custom menus in the file will be imported. If a menu with the same Menu Id already exist, you get a question if you want to replace the existing menu item with the imported. You have the alternatives to answer "No", "Yes", "Yes to All" and "Cancel". "No" will not import this menu, instead continue to import next menu. "Yes" will replace the menu with the imported. "Yes to all" will replace this menu item and all other menu items which have the same menu id as the ones that are imported. Cancel will abort the operation.

Note: In addition to this legacy export/import, custom menus can be exported and imported through Application Configuration Packages. A custom menu can be added to an application configuration package through the RMB "Add to Package" in Custom Menus overview or in application forms hosting custom menus.

How to troubleshoot Custom Menus

If the Custom Menu is not Enabled check the following:

             -  Custom menus on child tables can be activated by right clicking on the child table and then selecting  'Include Custom Items' in Properties - Window tab of the child table .