Catch exception and skip the steps inside loop

Hi friends

I am using for each loop.

*When it Catches any exception ,
it should send an email for that record and skip other steps inside loop and move to next record on loop.
*When no exceptions, normal flow inside the loop should work.

how can we do this.
Thanks for your support always

1 Like

Fine
Inside the FOR EACH activity we will be having a container named BODY

now keep that BODY part alone inside the TRY block of Try Catch activity
So that if a particular item inside the Body container of For Each loop fails in try block it will go to CATCH block and there choose the exception type as System.Exception and inside that block use a Send outlook mail activity which will send the mail

And it will go for the next item of the For each row variable

The structure be like this

FOR EACH
-Try
—Body of For each loop
-Catch
—Mail activity

Cheers @oshan

2 Likes

Hi Palaniyappan

Thanks a lot.
But how can i take the exception occurred record and put it email

Of course we can
As the try catch block is used per transaction in a for each loop we can get the row data in catch block as well

Cheers @oshan

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.