Hi Hareesh/ Rodrigo,
I have tried both of your code. still I am getting the same error.
I have one more question. I have implemented the same code in Sandbox and it successfully runs. But now I am trying to implement it in Development same way and I am getting the error.
So my question is, is there any configuration changes needed in Development.
Thanks & Regards,
Moumita