Skip to Content

Exception Handling on the UI

Oct 25, 2016 at 01:52 PM


avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Pradeep Kumar N
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.

10 |10000 characters needed characters left characters exceeded