I'm investigating an issue where values of one of the columns on the "FieldPermissions" object get truncated when we sync them to a DB. The column in question is called "Field", and it contains the name of the field being permissioned in the form .. A Describe call on the FieldPermissions object returns length: 40, and our ETL process sizes the db column accordingly, and then enforces the length during the load. When querying the results, I noticed a few records with longer values got truncated. I then used SOQLXplorer to run the same query againsf SF directly, and found the values return correctly (non-truncated), and some of them are longer than 40 chars (51, to be exact in one case). I ran a Describe call in the workbench to confirm the values:
A few questions around it:
Fieldcontain a string longer than the length advertised by the API?
There is another attribute called
byteLengththat actually returns 120. Could that be the "real" length allowed into that field? If so, would it be applicable to all string fields?
SOQLXpolorer must be using the same API to talk to SF, so why would it correctly display the long strings, even though a "describe" in the app also shows 40 as the string length?
If someone could help make sense of this, would be greatly appreciated.