0
{!Account.contacts[i].Lastname}

where i is Javascript loop variable.

ERROR : Unknown property 'AccountStandardController.i'

1
  • can you please add the code.
    – Annappa PH
    Commented Feb 23, 2018 at 11:35

1 Answer 1

3

I presume this is a Visualforce page.

This expression:

{!Account.contacts[i].Lastname}

is processed at the server-side where any values used such as i must exist as properties on the Apex controller. Once that processing is done, the resulting HTML is passed to the client-side (the browser) where there can also be a JavaScript variable i.

Best to think more about what you are trying to achieve keeping the server-side/client-side distinction in mind.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .