Hello Community,
Our lead assignment rules in SFDC are powered by specific values in a picklist field. We are also running alerts on contacts with the same data. Our SFDC Admin team has just has enabled restriction to the picklist values in those fields, so that we are notified in Marketo when the data isn't correct, and can fix it before it passes for assignment / alert. We are running into an issue where we cannot pass the values to the contact record, as somehow "\n" is appended to the value when we update them in Marketo, and then rejected by SFDC due to a mismatch with the restricted values. The lead data updates are working fine. Has anyone ever seen a similar issue?
For reference, the restricted picklist field on the contact record has a controlling field, whereas the lead does not.
Any insights would be helpful!
Are these textarea fields on the Marketo side?
Ah should have specified; the marketo data type is string.
And you're updating these using the UI, or an API?
we are updating them with the API
Then it stands to reason that your code is pushing a trailing \n.
The only way you can get a \n via the UI is if it's a textarea (which must support line breaks, by definition).
But \n is a perfectly valid character within a string, so if that's what comes in, that's what you get.
the typical way this data gets into Marketo is via a list upload or a form submit (form has picklist values.)
Where would the code that is pushing the \n be originating? Looking to understand if this is something we can fix via process enhancement or if it is a bug?
List upload and form fillout (assuming Marketo form) are specially *not* API-driven methods. So you are not using the API to update Marketo, in fact.
I feel like i should specify, the \n is not actually appending to the data in the field (in marketo or sfdc) but rather, appearing appended to the selected value in the error message (as listed above.) After some list loads, we changed the value directly on the record in marketo - so selecting a different value from the picklist, this also generated the error message. my hypothesis is that the changes in SFDC somehow affected the available field data values in Marketo, causing it to throw this error...
Are you still getting this error? We are too!
The Salesforce record doesn't have the "\n". The Marketo record doesn't have the "\n". But the error message notes that the field's value has an "\n". So odd.
I'm about to delve into a related Salesforce flow that might be culprit. This link talking about the uses of "\n" can help explain why this appears technologically.
But the error message notes that the field's value has an "\n". So odd.
Are you sure that's what it's noting? The posts earlier indicate that's just literal text in the log line for the error. Doesn't mean it's ever been in the field. For example, if I clip out a line from a text file, I may or may not include the \n that's always at the end (except for the very last line). If you print that line and unescape the \n that doesn't mean it has any relevance to the content.
I feel like \n (whether a literal newline or a quoted "\\n") isn't the problem here.
True - perhaps the log line for the error is all that it's displaying. That said, it's still blocking the sync to Salesforce.
I looked in a bit more, and only got more questions. For others who run into this issue and are frantically Googling to get through it:
We currently update this custom lead source field (an SFDC picklist) via the UI, through a Change Data Value flowstep. The field itself in Marketo shows the correct value. But we get this restricted picklist error (and a subsequent inability to sync back) regardless. The Salesforce lead record does not have the added field values, so we've confirmed that it has not been syncing.
No clue what the solution is. C'est la vie!
bumping this back up.
has anyone found a solution for this? we are bumping into the same issue and noticed that on occasion the /n does not get appended but still fails.
Did you ever crack this one? I'm seeing something similar and I'm stumped.
I came across pretty much the same issue; noticed that when directly picking a value from the picklist (populated via SFDC) I get no error, but when importing the value or typing it in I get an error.
I used the DevTools to inspect the SFDC picklist values - open a person record, "open" the picklist of the affected field, righ-click on the picklist and inspect. We are getting our values with a ​ appended, this is causing the issue. While the value looks idential on the UI, SFDC does only recognize the value like that. We are currently checking on SFDC side to fix this, so the values are plain text.
Maybe that helps?
OK, so the "\n" is just an artifact of log output and doesn't actually have anything to do with the issue. (It thus results from double-encoding at some point.)
So with that gone, what is unexpected now? I'm confused. Either the record matches the picklist exactly and still throws an error (which is weird) or your picklist values are out of whack (which might have a unknown origin, but right now the system is working correctly).
Also want to note - we are specifically loading values that we know to be correct into Marketo to test this.. that is the confusing part, somehow the \n is what is listed in the error message. For example, we loaded the correct value "GRC" but the error message shows the \n....
Please attach a spreadsheet, in your typical format, with some rows that are proven to throw this error.
Form post data from a select won't contain the \n.