Skip to Content

Exception Handling on the UI

Hello experts,

I recently discovered an exception which I am right now not able to handle.

To create the exception

  • Create a DataList on the screen + a button which triggers custom rubyscript to write the current selected row into a datafield. Afterward a custom action and a save will be triggered.
  • Save and Activate the screen to make it work, go to the screen in web browser and simply press the button without selecting a row.

This exception

should appear

My button is located in IntegratedToolBar, due to attachment-restriction it's not added here.

This is my rubyscript

Is it possible to handle the thrown exception in the rubyscript or do i have to maintain a condition or am i totally wrong? If it is possible to handle the expectation in rubyscript, could you please provide me some code since i am not experienced in ruby (this code is just generated by pressing cntrl + space).

Have a nice day,


expectation.png (3.6 kB)
rubyscript.png (8.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 26, 2016 at 02:43 AM

    Hi Johannes,

    You cannot handle exception in Ruby script, instead you could do check like this:

    if ($data.DataList.LeadSelectIndex > -1)

    Thanks, Pradeep.

    Add comment
    10|10000 characters needed characters exceeded