3 Replies Latest reply on May 1, 2017 1:21 PM by Grégoire Michel

    Requesting all records from a Custom Object - Velocity Script

    Olga Khadieva

      We are trying to come up with a Velocity Script to display all records from a Custom Object.

      We have Subscribers (leads) with 1, 2, 3 or more  Beneficiaries in a Custom Object. Our email message should look like this:


      Dear <Subscriber Name> .
      Here is the info about your Beneficiaries:


      Beneficiary 1 Name
      Beneficiary 1 Plan #


      Beneficiary 2 Name
      Beneficiary 2 Plan #


      Beneficiary 3 Name
      Beneficiary 3 Plan #

      I tried to use the following script for this:








      However, if a Subscriber has less than 3 records in a Beneficiary Custom Object, this script would return an error and the email won't be delivered.

      Is there another solution for this?