You need to sign in to do that
Don't have an account?

getDescribe() method is not working
Hi,
getDescribe() method is not working .
code:
Schema.Describefieldresult result = Quote.test__c.getDescribe();
It gives me error saying that : Method does not exist or incorrect signature: [String].getDescribe()
but the code snippet is working fine in developer console or execute Anonymous block.
Pls suggest... I have read in Some blog that there its a problem with version of the class, I tried changing it but still the issue isnt resolved.
Thanks.
I think it should be:
Schema.Describefieldresult result = Schema.sObjectType.Quote.fields.test__c;
result = result.getSObjectField().getDescribe();
page 167 of the Apex developers guide.
All Answers
I think it should be:
Schema.Describefieldresult result = Schema.sObjectType.Quote.fields.test__c;
result = result.getSObjectField().getDescribe();
page 167 of the Apex developers guide.
Oh thank you. it worked...
As I mentioned in my earlier post
Schema.Describefieldresult result = Quote.test__c.getDescribe();
this was working fine in my developer console and anonymous block but not in code.... Not sure why we have this inconsistency ..
Any ways thank you again.