I have a token on an email that is showing as cut off.
In salesforce, my custom object (I'll call it Sample) has a text field named MyField__c. I have a second custom object named Sample2 with a field called Name.
In a token, I have the MyField being set like so:
#set($myField = $Sample.MyField__c)\
#set($lengthNumber = $Sample.MyField__c.length())
In the salesforce data, the value for MyField on the record I'm testing is '12-34567-890' which is 12 characters long.
In the letter that is sent, the value comes out to be 12-34567-.
No matter what I do, it seems to limit the output to 9 characters.
I've tried adding an A to the start of the data for this record, removed the dashes, and tried it with other records.
I've refreshed the Salesforce schema in Marketo several times.
The field shows as text in the field list but I can't get any more data on it.
I've verified that it's the right letter and the right token, but changing both and seeing my changes reflected in the email I get.
This is very strange. The field definition in Salesforce is text length of 12 and most records do not have data in this field. But that shouldn't cause this to happen, should it?
Other tokens I have using this exact type of code (with other fields) work fine. For example, on the Sample2 object, the Name field fully shows with much longer data.
(Please highlight your code using the Advanced Editor's Syntax Highlighter so it's readable. You can use Java as the language, since there's no Velocity proper.)
Unfortunately, with SFDC-originated COs, there's no way to get an absolute second opinion about stored data in Marketo. But what happens if you create a Smart List that attempts to filter on Has Sample and constrain by this property (with the [is] operator, of course)?
That's a great way to look at the data.
I tried it. Looks like the data is getting chopped off in the sync somehow which is something I suspected.
I even tried making the salesforce field text (15) and then schema refresh, to see if that would do it.
Not sure where to go from here though. How do I get the data load to be correct?
Have you tried this with a brand-new field? I'm afraid your field is stuck at the original max length in Marketo, which must have been 9. You can contact Support to see if they can manually extend in the database.
I'l try that. It's a shame a schema refresh doesn't fix it. But at worst I can add a new field, copy the values over, and drop the old field.