admin 發表於 2017-5-29 21:52:03

Configure Custom Menus ( apps75 )


https://wis.ifsworld.com/f1docs/apps75/Foundation1/030_configuration/020_user_experience/120_admin_configure_custom_menues/default.htm

Foundation1 / Configuration Guide / User Experience / Admin Configure Custom Menues / This page



Foundation1 Configuration Guide - Configure User ExperienceConfigure Custom Menus
Most of the windows in IFS Applications have predefined context menus.
If the application usershave needs for additional actions to be performed in a window, the administrator canconfigure additional actions to be available in the context menu.
The usersthemselves can then decide if they want to use the standard menus, the onesconfigured by the administrator,or both.
The choice is made per window, so it is possible to use standard menus inone window, and custom menus in another.
[2009-01-27 Added new functionality so support custom menus in the new client EnterpriseExplorer
2009-12-08Restructuredcontent to separate procedures from concepts and reference descriptions.
Contents

[*]About Custom Menus
[*]About Action Types
[*]Window Descriptions
[*]How to create a Custom Menu item
[*]How to use form data in parameters
[*]How to map keys from the source to the destination
[*]How to make the Custom Menu item support different languages
[*]How to troubleshoot Custom Menus
About Custom MenusT
he Custom Menu are built by creating Custom Menu items. Each item belongs toa certain window, and more items can be configured on the same window.
To createthe items you follow the general procedure outlined in How to create a Custom Menu item
The name of the Custom Menu item is defined in all the languages that are tobe used. Read more on How to make the Custom Menu item support different languages
To make certain that the new options are controllable from a security aspect,you will connect the items to Presentation Objects,
the objects that are grantedto users through the permission sets in IFS Solution Manager.
If a connectedPresentation Object is not in any permission set granted to the user, the CustomMenu item will not be presented at all.
The actions that can be performed by executing an Custom Menu item, includespossibilities to open other windows, running methods in the client application,performing actions in the server and starting other applications or pages.
TheAction Types define the actions, and for each Action Type you may add additionalparameters.
Note that in order to specify parameters correctly for the advancedAction Types you will need knowledge from the application source code. Read more About Action Types.
The parameters to the target for the action, a URL, or a procedure call, mayuse data from the form, read more about this in How to use form data in parameters

About Action Types
There are three categories of Action types that specify in which clientframework they are available.
The categories are General, IFS Windows Client andIFS Enterprise Explorer. Category General specify that the Action Type isavailable both in IFS Windows Client and in IFS Enterprise Explorer.
General ActionsPossible General actions for a custom menu item are:


Action TypeDescriptionParameter
Create WindowA new window will be opened. Name of the window to start. The name of a window can be               found through that window’s Properties.
User MethodThe 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 findthe correct identifier to use.
Create Window with TransferAs 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.
State MachineAn 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.
SeparatorA separator will be added to the menu.
Windows Client Actions
Action Types for custom menu items that only will be available inIFS WindowsClient are:


Action TypeDescriptionParameter
SAL Code on Each RowA piece of SAL (Scalable Application Language used in               IFS Windows Client) code that will be called for each selected row. This action requires               deep knowledge of the application’s program structure.The source code.
SAL CodeA piece of SAL code will be called. This action requires               deep knowledge of the application’s program structure.The source code.
Enterprise Explorer Application Forms Actions
Action Types for custom menu items that only will be available inIFSEnterprise Explorer are:


Action TypeDescriptionParameterExample
ReportThe 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
PL/SQL BlockExecutes a PL/SQL block. The PL/SQL source code block to be executed.PLSQL Block Custom Menu Sample
Quick ReportThe Quick Report specified in the Parameter field will               be executed.Name of the quick report to execute.Quick Report Custom Menu Sample
External ProgramStarts an external program.The external program to start.External Program Custom Menu Sample
URLPerforms 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
Window Descriptions
The management of the Custom Menu items are handled in two windows in IFSAdministration tool, Admin.exe.
The detailed form,Custom Menu, is the place to create, edit and delete the items, theoverview supports searching and managing several items at once.
It is in theoverview, Overview - Custom Menus, you find the possibilities toimport and export collections of Custom Menu items.

Figure: The Custom Menu detailed window. The tab Menu textshows how to define the item for use in multiple languages.

Figure: The overview with the operations available.Field Descriptions
FieldDescription
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).               To find out a child table’s name, use the Debug tab on the properties (the               Debug tab appears only if the Console is running).
OrderingThe custom menu items will appear on the pop-up menu sorted               by this value.
Action TypeWhat this menu item will do. See the list of possible actions               below.
ProcessThe 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.
ParameterA parameter to be sent to this action. See the list below               for explanation.
Bundle ExecutionUsed only if the action type is Quick Report. When it               is checked the Quick Report is performed once for all keys of the               selected rows. When it is not checked the Quick Report is performed for               one selected row.
Presentation ObjectUsed 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.
Enabled WhenUsed only if the action type is SAL Code. It should contain               a Boolean SAL expression that will determine if the menu item should be               enabled or disabled.
Activities
[*]Create Custom Menu: Open the form Custom Menu         and press new (F5)         to create a new record. Follow the activity description in         How to create a Custom Menu Item
[*]Delete Custom Menu: Open the form Custom Menu         and locate your menu item to delete, press Delete (F8).
[*]Export Custom Menus: Opens up a dialog where you select         where to export your selected Custom Menus. The result is a SQL-Script         containing all selected Custom Menus and their data. This script can be         executed from SQL File Executor or some external tools like SQL*Plus.
[*]Import Custom Menus: The Import Custom Menus will openthe selected SQL-Script in the SQL File Executor to be executed.View         Details: Move from the overview to the detailed form with the selected         entry.
How to create a Custom Menu Item
Menu items on a custom menu are created by creating new records in the CustomMenu window.   
In most IFS forms an Context Menu is available to easily accessother areas of the application and to review more detailed information.
Ifthese menus do not correspond to the needs of the end user then it is possible toeither switch off these menus or to add some customized items (the IFS Custom Menuoption) to them.

Note - Warning: There are some forms where the Custom Menuoption either doesn't work or cannot transfer values across into the newly openedform.Be aware of some limitations and always test the facility that you needfirst.

For example - the transfer of selected (highlighted) information in one Overviewform does not carry forward to another overview form.The best result is toset '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 linkto the Purchase Part form and the Purchase Part to Supplier forms

[*]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
[*]Custom Menus are enabled or disabled in the Properties of a form.          Just select or clear the Custom Menu checkbox on the left hand side.         Press OK to         save.
[*]      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
[*]Open the Configuration/Custom Menu/Custom Menu         window in IFS Admin executable.

[*]Add (F5) a new record and complete the details as follows :Menu               ID: system generated
Process: default is NONE                  Action Type: select an action type (see               more about Action Types)
Window: enter the window identity where you want to see the new                   option - tbwPurchaseOrderLinePartOrdering: numeric value determines               the sequence of items in a custom menu, enter 1 for the first item etc.
Parameter: enter the window to be accessed from the new custom menu               option - frmPurchasePart
[*]SAVE the record
[*]      Enter information in the Menu Text and         Key Translation tabs.          Note: Key Translation is enabled depending upon the         selected Action Type .

[*]Menu Tab:enter a language code (en) a                  Title (this will               be visible in the new Custom Menu itself) and a Status Text (this will be               shown in the form status bar as 'help')
[*]                SAVE
[*]Key Translation tab: 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
[*]SAVE
[*]Once the Custom Menu options are defined log off the Application executable         and then log on again to see the effect.

How to use form data inparameters
For menus with action type URL, PL/SQL Block and External Program it ispossible to use field values in a form, and context substitution variables inthe Parameter field.
The values can be used as parameters in a url, as bindvariables in a pl/sql block and as parameters to an external program.
The syntaxrule is #<context substitution variable># for context substitution variables and &<column name> for form fields.
Examples of usage:


[*]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 &.
[*]URL: C:\My Files\My document.doc
Opens the document with your normal program associated with .doc         files.
[*]PL/SQL Block: BEGIN Company_API.Set_Name(&COMPANY, 'ABC' );      END;
      PL/SQL Block: BEGIN Company_API.Set_Name(#USER_COMPANY#, 'ABC' );      END;
      The framework replaces the given substitution variables in the PL/SQL block,         with global bind variables containing the actual value.

!2012-03-08 Note added.         Note:      The PL/SQL Block Custom Menu command defined in the above format will not be committed to      the database till a COMMIT is enforced by the application. If the user needs the PL/SQL block custom menu to commit      immediately he must call the COMMIT statement at the end of the block.
PL/SQL Block:          BEGIN Company_API.Set_Name(&COMPANY, 'ABC' ); END; COMMIT;
[*]External Program: Productconf.exe &PART_NO

How to map keysfrom the source to the destination
If the action type is Create Window, the keys for the current record will besent to the created window and it will be populated using those keys. Ifsomeother information than the keys should be sent, or if the keys are differently namedin the destination window, the Key Translation tab can be used to specify what informationshould be passed between the windows. Source Key Name is the name of the columnfrom the source window. The value of the column will be sent to the destinationwindow and interpreted there as Dest Key Name. Note that if you are usingKey Translations, the keys will not be sent automatically,you will have to specify them if you want them to be sent as well.
If the action type is Report orQuick Report the report parameters areregistered in Key Translation. Source key name is the column name in windowwhere you have the custom menu and Destination key name is the report parametername.
For menus with action type Quick Report thatare set up to use Bundle Execution, reportparameter name and source column names are defined in the Expandable Parameter tab. The Expandable Parameter tab consist of a table withthe columns   Parameter and Source Key Names. Thelist of column names, on the window of thecustom menu, that are to be used as quick report parameter values are entered inthe Source Key Names column. The name of the reportparameter are entered in the Parameter column.

Howto make the Custom Menu item support different languages
Each menu item (except separators) must have menu text for every language thatis going to be used. The menu texts are added using window Custom Menu - Details.


On the Menu Text tab enter following information:



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.
How to troubleshoot Custom Menus
If the Custom Menu is not Enabled check the following:


[*]Check that the form Properties         - Window tab pop-up details have enabled CustomMenus (select the checkbox).
[*]Check that the Window and Parameter information in Admin/Custom Menu have beenspelled correctly. The system happily saves incorrectly spelled values but thencannot use them!
[*]Check that the appropriate language option exists in the          Menu Text tab.
[*]Check that the information in Menu Text         is complete
[*]Verify that presentation object attached to the custom menu is in a         permission set used by the user.
頁: [1]
查看完整版本: Configure Custom Menus ( apps75 )