2 Replies Latest reply on Jun 16, 2017 6:18 AM by Phillip Wild

    Velocity scripting - can only access the first element in Marketo Custom Object

    Phillip Wild

      I'm having trouble accessing anything other than the first element in a Marketo Custom Object through email scripting.

       

      I've tested using a few leads, and here's the behaviour I'm seeing. All leads had at least three entries in the relevant Marketo Custom Object:

       

      * ${MarketoCustomObject_cList.get(0).fieldName} resolves correctly with the first element in the array when using "Send Sample Email".

      * ${MarketoCustomObject_cList.get(1).fieldName} gives me no errors, but doesn't send the sample email when I use "Send Sample Email".

      * ${MarketoCustomObject_cList.get(2).fieldName} gives me no errors, but doesn't send the sample email when I use "Send Sample Email".

       

      Why would this be occurring? According to this page: http://developers.marketo.com/email-scripting/

       

      "For each custom object, the 10 most recently updated records per person/contact are available at runtime and are ordered from last updated(at 0) to oldest updated(at 9)."

       

      Any ideas? I really hope this can be resolved.

       

      Thanks in advance.