2 Replies Latest reply on Apr 11, 2018 11:16 AM by Sanford Whiteman

    Velocity script retrieving fields value from last opportunity


      Hey guys!

      I've been trying this Velocity script inside a token in order to retrieve fields value contained in the last opportunity attached to a lead:


      $!OpportunityList.get(OpportunityList.size() - 1).fieldName


      But an error occurred while rendering the email (error is happening when encountering " - 1").

      Any thoughts about this?


      Thanks a lot