function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NodakPaulNodakPaul 

Method does not exist or incorrect signature: [Schema.DescribeFieldResult].isUpdatable()

I am trying to determine if a object field is able to be updated or edited using the Schema.DescribeFieldResult.  According to the Language Reference, this should be a valid method:

Field Describe Result Methods

The following table describes the methods available as part of the field describe result. None of the methods takes an argument.

...

isUpdatable BooleanReturns true if the field can be edited by the current user, false otherwise
However, when I try to use the method in my code, I get the following error:
ErrorError: Compile Error: Method does not exist or incorrect signature: [Schema.DescribeFieldResult].isUpdatable()

Code:
Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
Schema.SObjectType leadSchema = schemaMap.get('Lead;);
Map<String, Schema.SObjectField> fieldMap = leadSchema.getDescribe().fields.getMap();

for (String fieldName: fieldMap.keySet()) {
    if (fieldMap.get(fieldName).getDescribe().isUpdatable()) {
       ... do some logic
    }
}

 Anyone see what I am doing wrong?  FYI, if I insert any other method from the language reference in place of isUpdatable() (like isNillable(), isNameField(), etc), it compiles just fine.  What is wrong with this specific method?
tmatthiesentmatthiesen
This is a doc error.  The correct signature is: [Schema.DescribeFieldResult].isUpdateable();