Forum

Armin Winkler
      Has successfully completed the online course Introduction
      Has successfully completed the online course Intermediate (200)
      Has successfully completed the online course Advanced (300)
      Has successfully completed the online course Basics (100)
    1 year ago #38544
    Up
    1
    Down
    ::

    Hi Max,

     

    all you need to do is use that command oEvent.getSource() and paste it into the code editor within a script activity in the Process Designer or alternatively in a client-side business object function, as this is a method that can be invoked on the native OpenUI5 widget using Javascript. If you connect the button press event subscription with such a script / client-side business object shape in one of your Process Designer stories, then that Javascript code will be executed as soon as the button gets pressed. The output of oEvent.getSource() should return a reference to the sap.m.Button that fired the event and from that you can now retrieve the ID or the button text, by invoking the respective getter methods for the button’s properties Id and text: oEvent.getSource().getId() or oEvent.getSource().getText(), respectively. Again, here are links to the API reference:  https://sapui5.hana.ondemand.com/#/api/sap.ui.base.ManagedObject%23methods/getId & https://sapui5.hana.ondemand.com/#/api/sap.m.Button%23methods/getText

     

    Hope it’s clearer to you now.

     

    Kind regards,

     

    Armin