Marketo VTL Token Script Returns SFDC Field name not field value | Adobe Higher Education
Skip to main content
Level 2
November 2, 2022
質問

Marketo VTL Token Script Returns SFDC Field name not field value

  • November 2, 2022
  • 1 の返信
  • 2085 ビュー

Hello, I am running into an odd issue. I just synced a new field from Salesforce to Marketo called "Premises_Number__c" this field is a text field. When creating a token script to get that field displayed in an email, the token returns the field name and not the field value

 

Field Name: $Facility_Allocation__cList.get(0).Premises_Number__c 

Token Script: ${Facility_Allocation__cList.get(0).Premises_Number__c}

Value Returned: ${Facility_Allocation__cList.get(0).Premises_Number__c}

Value supposed to return: 123456789

 

This is the first time I encounter an issue like this, the field is checked on the left side field view list on the "Edit Token Script" window.

このトピックへの返信は締め切られました。

1 の返信

SanfordWhiteman
Level 10
November 2, 2022

Unless your app is specifically coded to never create more than one CO record of this type per person, you shouldn’t just be using the first (0-th) item in the list. You should be sorting and deliberately accessing the first created, last created, or using some other criteria to filter.

 

If you dump the entire list you should see quickly why this is happening. 

ClearwayFrank作成者
Level 2
November 2, 2022

This I 100% agree with, I was just testing quickly that a record I know only has 1 item in the list would just show the info before scripting something longer, but it just shows me that field name instead of value.

 

SanfordWhiteman
Level 10
November 2, 2022

Then you should print the entire list (the ArrayList) to see what’s in it.