I haved loged support ticket as well for this, but Support people said velocity script part is not supported by support team.
What I see here is not problem in script itself, but the behaviour or email in two situation.
here is the support ticket number : 00598438
Are you sure that you're impersonating the same record between the preview and the sample? Different numbers of available records would change the outcome of the rendering.
@Kenny Elkington I am using same lead record in preview and send sample, the loop condition does not work in send sample, it display onlyn 1st record, index(0) record, even though when lead has multiple custom object record associated with it.
hi Indu Poudel
Did you get it to work? I think you must already have figured it out by now.
Did you try to test against multiple test leads with different custom object records?
For testing velocity scripts, I generally do not rely on preview or send sample. I actually run a couple of leads with custom object records through a 'test' smart campaign to actually send the email. That's the best way to test in my view.
Hope this helps