cancel
Showing results for 
Search instead for 
Did you mean: 

Exception Handling on the UI

JOSC_ITLAB
Participant
0 Kudos

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,

Johannes

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186648
Active Contributor
0 Kudos

Hi Johannes,

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

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

Thanks, Pradeep.