If you read the comments on the link above on the MORE Maximo community, I talk through how to create a script that hooks into the dialog events (by creating a DATABEAN.NAME script with two implicit variables that describe the app it is in and the id of the bean). In the script, declare a function with the identical name of the event. You can intercept the event at that point and do whatever you need to do. For example, if you want to completely handle the event in the automation script (never make it to the bean class event), call:
ctx.setEventHandled()
And that will prevent the framework from proceeding on to the bean class event. Or you can just manipulate the data as needed and then after your script is done it will proceed on to the bean class even itself.
------------------------------
Steven Shull
------------------------------
Original Message:
Sent: Wed January 10, 2024 04:05 AM
From: Andrey Ilinskiy
Subject: Automation script for dialog
Thanks for your answer. I saw that presentation, unfortunately only only in recording. The idea is do not to create script for application action, but for dedicated dialog only to extend existing logic.
For example, i have import csv dialog. I need to override existing logic if based on users selection. All that logic is dialog bean, so is it possible to do something here?
------------------------------
Andrey Ilinskiy
Handz.on
https://www.on.de/
München
Original Message:
Sent: Tue January 09, 2024 08:24 PM
From: Manoj Sawant
Subject: Automation script for dialog
Hi Andrey,
There is new system property mxe.script.allowbeanscript which is to be enabled. Then create script with APPBEAN.APPNAME ( For e.g. APPBEAN.WORKORDER ) as script name and ensure "Allow Invoking Script Function" is enabled.
There is good presentation by Steven Shull which explains this along with example.
Please refer below thread:.
https://moremaximo.com/discussion/msug-automation-scripts-in-maximo-application-suite
Or below recording
https://register.gotowebinar.com/recording/9000796134191766017
------------------------------
Manoj Sawant
Original Message:
Sent: Tue January 09, 2024 06:35 AM
From: Andrey Ilinskiy
Subject: Automation script for dialog
Hi!
Is it possible already to create scripts for dialog beans?
Especially looking for the possibility of making custom dolongop functions
------------------------------
Andrey Ilinskiy
Handz.on
https://www.on.de/
München
------------------------------