Re: Email Script Token to Filter Salesforce Lookup Object

Irwin_Horowitz
Level 2

Email Script Token to Filter Salesforce Lookup Object

We have a custom junction object in Salesforce, Clubs Volunteers, that links the Salesforce Contact object with custom object, Clubs.  We've created tokens for fields in the Clubs Volunteers object.  If there is only one Clubs Volunteer object for the contact record, the token resolves to the correct value.  If there is more than one club volunteer object for the contact record, the token does not resolve. I can understand why this happens, and see a possible workaround by using a Marketo Custom Object for the club volunteer object. 

Is there a why to filter the volunteer object in the Email Token Script without creating a Marketo custom object?  Adding a script filter doesn't help resolve the object if there's more than one.  When there's one record, the script below works.  More than one, it doesn't resolve. 

Thanks,

Irwin

#if(${Club_Volunteer__cList.get(0).Club_Year__c} == "2016-17")

  #set($Sponsor = "${Club_Volunteer__cList.get(0).Sponsor_Name__c}")

    In IF

    ${Club_Volunteer__cList.get(0).Sponsor_Name__c}

#end

$Sponsor

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Email Script Token to Filter Salesforce Lookup Object

S/b in the Products space, which is the main support area. Champions space refers to the Champions program itself.