Reply
Newbie
sfguy
Posts: 1
0

Expression of type Schema.DescribeSobjectResult has no member named fieldsets

Hi ,

 

I am trying to retreive the describe information on field sets on the opportunity object and am getting the following error while trying to save my class.

 

Save error: Expression of type Schema.DescribeSObjectResult has no member named fieldsets

 

Here is the code i am trying to save

 

Schema.Describesobjectresult descSobjectResultObj = Opportunity.sobjectType.getDescribe();
Map<String,Schema.FieldSet> fieldSetNameFieldSetSchemaMap = descSobjectResultObj.fieldSets.getMap();

 

I am working in the sandbox. I know that field sets is only released in beta mode , so I am not sure if there is some other setting/configuration that we need to be set in order to get this working in apex code. Maybe the API version on the class. I am on 23.0 . I am not sure. Any help is greatly appreciated.

 

Thanks,

 

 

 

Regular Contributor
kibitzer
Posts: 106
0

Re: Expression of type Schema.DescribeSobjectResult has no member named fieldsets

You need to upgrade the API version of the class. I don't recall when fieldsets was added exactly, but I'm pretty sure it wasn't available on 23.


Dan

 

Author: Advanced Apex Programming for Salesforce.com and Force.com
AdvancedApex.com