Example of try catch alike method in outsystems

Example of try catch alike method in outsystems

  

hi, can someone give an example about using try catch alike method in outsystems ?
The case is in client action: my logic has an error on CreateOrUpdate method. The error is about data.


my entities is like this :


I already check the data, but there is no row that has length more than 14 or 15 in field CollateralTaksasi.

so now, I want to check suspected data, but I don't how to replace the exception msg to become the entities key.

Hi Tobit,

You can use debug and set breakpoint before performing "create or Update ..." action so you can catch what record fields are passed to it and verify length. 

Mykola Tkachenko wrote:

Hi Tobit,

You can use debug and set breakpoint before performing "create or Update ..." action so you can catch what record fields are passed to it and verify length. 

oh sorry, i forgot to mention that this is client action method, so i cant use debugger


In this case you can use JSNode to output your record in browsers console for example. Don't forget to use object as a type for js input variable and ToObject(your record here) when assigning value to it.

Mykola Tkachenko wrote:

In this case you can use JSNode to output your record in browsers console for example. Don't forget to use object as a type for js input variable and ToObject(your record here) when assigning value to it.

can you give me some dummy example / screenshot of using jsnode ?

Solution

Solution

Mykola Tkachenko wrote:

very cool dude, thankss :)