Cannot read property ‘valueOf’ of undefined

What does the above error mean? And why does it seem to be caused by the parts circled in red?


Hi YS,

There's no "above error" in your post. That's a very confusing piece of code, as the happy flow seems to be that the first For Each isn't finished (if it is, an error is shown). But without the actual error I can't tell you more.

YS Yeo wrote:

What does the above error mean? And why does it seem to be caused by the parts circled in red?


You can add a break-point & debug the same respectively.

So that Folks here can help you :)

Solution

Haha okay this works:


Solution

That looks better. However, I'd urge you to look at the ListAny System Action. It allows you to scan for an occurence of one or more specific records in a list. It seems that's what you could use, instead of twice looping over it.