1 Reply Latest reply on Jul 19, 2016 7:10 AM by Irwin Horowitz

    Email Script Token resolution with multiple lookup objects.

    Irwin Horowitz

      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