Administration > Events > Event control > Own events - robinfeng/beashelp GitHub Wiki
Next to standard events you can add own events. Example: change of customer data, project, assembly posting etc. Some basic knowledge of beas script is needed.
How to:
With an event (in beas script use windowsevent) the event system can be called up. The event system is called: tools=createevent======
Command Meaning createevent Function, controlling the event system Filter Additional filter condition basetyp Arbitrary delimitation eg. for I item Item, C for customer. This makes sure messages are unique (Option: each message only once) Usually it can be left empty Important: Max. 1 character baseref1 Reference (eg. customer order, item number, document number etc.) Type "String", can also save numbers baseref2 Second reference - eg. work order item number. Only number. baseref3 Third reference - eg. operation. Only number.
This event is now available. Under Administration - Events a new activity definition can be created and the event can be entered under "events". To make it more easy to use, create an XML file in the project directory in which the event is defined. In this file, the name of the event, the description and template for new creation is saved directly.
Example customer change
- Call SAP Business One Business partners
- Change business partner, open the debug screen, save changes Now all events are set and the variables are displayed.
- Open customized extensions
- Enter the following script with the given information
windowevent update setvar=e_cardcode=<businesspartnerparams_cardcode> tools=createevent=cardcodechange==C=<businesspartnerparams_cardcode> end event
Now an activity definition can be created for the event "cardcodechange"
For further simplification of this event can be made permanently available. For this, in the project directory a file event.xml is created. Configuration must be the same as the file in c:\program files\beas software\beas\program\event.xml
Important: in the area of event definition no comment lines or empty row may be added
Important areas Area Meaning info Info on this file events Selection list of available events Configuration: Event name=Event ID Event name may be arbitrarily long Event ID may only have 20 characters at most. Only this is saved in activity definition In this area the event itself is defined. Example: ....
Definition of an event The following settings affect the screen Administration - Events. Area Meaning eventinfo Text information on this event key additional key for filter (activates the field eventkey). The name of the filter or field is defined here Milestone eventkey2 ... eventkey6 Enables up to 5 additional entry fields for definitions Alarm Days setupdisplayscript Script is executed if at new creation the event was selected or an existing definition was opened. Additional possibility do manipulate the definition screen.
Example: a drop down list in key field for mile stones post=item.eventkey.dropdown.select= milestone from beas_milestone order by milestone
To manipulate the list of recipients, a global function ca be defined, which is called when the recipient page is opened. The following script adds entries to the selection list of recipients global function user_getuser dw_1.item.senduser1.dropdown.addvalues=spr:Projektleiter 1=-10 dw_1.item.senduser1.dropdown.addvalues=spr:Projektleiter 2=-11 global end
Example: messagebox=hello world
info The given text is displayed in each tab, in which scripts can be executed. For example the available variables can be displayed. e_cardcode = cardcode from changed user new In this area all available fields are defined which can be set at event selection. All variables available in this window can be set.
Example 1: 1 Set up the message to be created as beas-message
Example 2: Area for item change
itemchange Bearbeiten 1 openwindow=artikel_edit.psr=s_parm1: 1 bmp\zoom.bmp OK 1 1 bmp\m_ok.bmp 1 bmp\clipempt.bmp item changed: from item changed: from itemname:返回 主页