问题
I have an automation script in Maximo 7.6.1.1 that updates custom fields in the WORKORDER
table.
I want to execute the automation script when the LatitudeY
and LongitudeX
fields (in the WOSERVICEADDRESS
table) are edited by users.
For performance reasons, I would prefer to only call the script when necessary (when the LatitudeY
and LongitudeX
changes).
What kind of launch point do I need to do this?
回答1:
You can create an attribute action launch point on the latitudeY field and another on the longitudeX field. These will trigger whenever each field is modified, so it will fire once when the latitudeY field was changed, again if the longitudeX field is changed, again if the longitudeX field is changed again, and so on. This is also all before the data is saved, so the user may choose to cancel their changes, but the scripts will still have fired.
You could also make an "on save" object launch point for WOSERVICEADDRESS (if that's what is actually being updated via the map). This will run any time data in the object is saved, so you would have to do the extra checks of seeing if either of those fields have changed and then do your logic, but at least it would run once and only if the user commits to their changes.
来源:https://stackoverflow.com/questions/57582369/maximo-use-script-to-update-work-order-when-a-related-table-is-updated