Skip to main content
Aug 22, 2016 3:16 PM UTC
Question

Rest API /describe returns readOnly fields as editable

I would like to use the REST API to list all the editable string type fields, with this endpoint:
/rest/v1/leads/describe.json

The problem is, it returns non-editable fields with the readOnly attribute set to false. For example:

{"id":104,"displayName":"Anonymous IP","dataType":"string","length":255,"rest":{"name":"anonymousIP","readOnly":false} ...

I have an integration where my users can select a field to store short string data. But at the moment they are able to select such non-editable fields, and their data gets lost.

Is there any way to filter the real read-only fields?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
User Group Leader
User Group Leader
Aug 22, 2016 6:09 PM UTC

One of several frustrations with the Describe API. At least they sort-of fixed a problem with max field lengths being wrong. (But not really, if you are syncing with SFDC.)

I actually think that readOnly means something else here, so it isn't even trying to be correct for your purposes.

Translate