• NodakPaul
  • 0 Points
  • Member since 2008

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2
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()

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?
I have a custom object for which I want to override the standard 'new' button with a visualforce page.

My visualforce page is created, but when I go to override, the page isn't in the list! What step am I missing? I am baffled. This is in my developer edition.

screencast of my steps:

Message Edited by EricVlach on 11-13-2008 12:30 PM
Is there any reason the Schema.getGlobalDescribe() method would suddenly stop returning anything?  I have noticed this strange intermittent behavior seems to start when I run test cases.  Sometimes the getGlobalDescribe will just stop returning anything for a day or so and then it just magically starts back up again.
Any info on why this happens would be much appreciated.  Thanks.

Message Edited by Shiztastic on 10-21-2008 02:45 PM