Iterating over Custom Objects in an Email Script? | Community
Skip to main content
January 20, 2015
Solved

Iterating over Custom Objects in an Email Script?

  • January 20, 2015
  • 1 reply
  • 1556 views
This help doc shows an example of iterating over Custom Objects in an email script: 

http://developers.marketo.com/documentation/email-scripting/

They've got Custom Objects named "Events", and in the script reference `foreach( $event in $EventsList )`, but they never explain why the variable name for the list of Events is EventsList. 

Is it just always "NameOfCustomObjectList", or did they configure that variable to that data somewhere, and not mention it? 



Thanks!
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by
It is done as nameofcustomobjectlist, and is done automatically.

As an example we have Licenses as our custom object so ours would appear as LicensesList.

1 reply

Accepted solution
February 6, 2015
It is done as nameofcustomobjectlist, and is done automatically.

As an example we have Licenses as our custom object so ours would appear as LicensesList.
June 2, 2015

I have a custom object called "Product & Charge" ... how do I come up with the List name for this? I've tried $ProductChargeList and $ProductAndChargeList and $Product_ChargeList... I understand removing the spaces, but I can't use the ampersand character because it comments out the text after it and the email errors out.

If anyone has any idea it would be extremely helpful. Thanks.

June 5, 2015

Try dragging a field into the email script from your custom object and see what Marketo named it.