AnsweredAssumed Answered

Velocity Script - Custom Account Object

Question asked by Ryan Miller on Feb 2, 2016
Latest reply on Feb 4, 2016 by Justin Cooperman

Hello, I'm new to Velocity scripting and have a general question.


We have a custom account object built in SFDC. This object is basically an extension of the account team where multiple product specialists are assigned to each account.  The object is sync'd to Marketo and I'm able to see the object and related fields. One of the fields on the object is 'Role'.  This field indicates the product specialty for each team member. 


I was hoping to have 'select' functionality within the scripting that would allow me to segment the team members I want to utilize within tokens.  However, the if/then logic I have been trying is ignored.


Is it possible to target specific records of the custom object and use their related attributes as tokens?


For example:

#if(${Account_Marketo_Team_Member__cList.get(0).Role__c} == "Sales Exec-ProductXX")

    #set (${Account_Marketo_Team_Member__cList.get(0).Basic_Name__c})



Returns the individuals name from the first row of the accounts custom object regardless of Role.