3 Replies Latest reply on May 25, 2016 4:21 PM by Nicholas Manojlovic

    Can company field be referenced in a velocity script?

    Elliott Lowe

      Our subscription expiration date is in a field on the Account object.  I have a subscription expiration reminder email that references that date via a field token; however, the format of the date is yyyy-mm-dd, but I want it to be mm-dd-yyyy.  I tried to create a My email token with a velocity script like '$date.format('MMM dd, yyyy aa', ${convert.parseDate(${company.CRD__c}), 'yyyy-MM-dd HH:mm:ss')})', but that fails when I try to approve the email and it appears that only fields on the opportunity and lead objects can be referenced in the script.  Is the only workaround to add the subscription expiration date on the lead object and use a formula field to update it from the Account object field?