Invoke Method: Value cannot be null

hello,

i try to iterate through a list and made this invoke and for each ativities as in the tutorials. Firstly the list should be empty and then filled by the get imap mail message with strings. It`s subject is to save, so that i use a assign activity in the body and list this variable as Parameters in the invoke. Unfortunately this error appears:

“message”: “Invoke Method: Value cannot be null.\r\nParameter name: TargetObject”

I also tried the invoke activity not on the top, but in the body of the loop. Then its the same. Can u help me to find the problem? Isn`t this the usual way to iterate through lists?

Thanks in advance!

hello @odawan

use Add to collection activity instead of Invoke method activity.

image

Regards
Ajay

The cause was another loop. Its too bad, that the exception doesnt tell me which one.

THX btw

Hi @odawan

You can post your xaml here if you want to easily address the issue. Thanks.

cheers :smiley:

Happy learning :smiley:

2 Likes