+ Start a Discussion
Navneeth RajNavneeth Raj 

Invalid type: Schema.DescribeSObjectResult ERROR

public class SchemaExample {
    public String result {get;set;}
        
    public SchemaExample(){
5        Schema.DescribeSObjectResult rst=Account.SObjectType.getDescribe();
        result='The obtained Result is:'+rst;
    }
}
Error:Invalid type: Schema.DescribeSObjectResult @ LINE 5
Abhilash Mishra 13Abhilash Mishra 13
Hi Navneeth
where are u trying to use this; code is working fine on developer console .
Navneeth RajNavneeth Raj
Me too used the same bt i got error, i deleted the class & retyped it and now it just worked fine. Donno why that error came in the beginning
Navneeth RajNavneeth Raj
Nope its not the error is back again donno why!
Abhilash Mishra 13Abhilash Mishra 13
please marked the question solved by selcting a best answer...
Navneeth RajNavneeth Raj
ERROR occurs again when i modify & save it again
Abhilash Mishra 13Abhilash Mishra 13
This code is correct and working. error may be occuring due to rest of the code....