apex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hsy541@gmail.com" <hsy...@gmail.com>
Subject Re: Emit values from an array
Date Fri, 30 Sep 2016 15:48:07 GMT
Is you pojo a shared object? I think you need to create new pojo every time.

Regards,
Siyuan

On Thu, Sep 29, 2016 at 3:03 PM, Jaikit Jilka <jjilka@leadferret.com> wrote:

> Hello,
>
> I am trying to emit values from an array. I am emitting using an for loop.
> Number of records emitted is correct but it is emitting only the last value
> of the array multiple times. So how to emit different values of array.
>
> int i =0;
> for (int j = 0;j<cares.length;j++) {
>
>  pojo.setID(id);
> pojo.seturl(url);
> pojo.setPosition(i);
>  pojo.setCares(cares[j]);
> i++;
> CaresOut.emit(pojo);
> }
>
>
> Thank you,
>
> Jaikit Jilka
>

Mime
View raw message