Hi @Anandhu,
Refer the below post.
you done correctly but i dont know why you are getting object Reference error
@ovi, @Susana, @ClaytonM can you Please check this case
Regards, Arivu