You need to sign in to do that
Don't have an account?
Too many field describles error-salesforce
Hi,
Here is my part of code..
schema.describefieldresult dfield;
Map <String, Schema.SObjectField> fieldMap = Schema.SObjectType.Opportunity.fields.getMap();
for(Schema.SObjectField sfield : fieldMap.Values()){
dfield = sfield.getDescribe();
Pair field = new Pair();
field.key = dfield.getname();
field.label = dfield.getLabel();
field.fieldname = dfield.getname();
field.val = dfield.getDefaultValueFormula();
fields.add(field.label);
if(field.fieldname== 'npe01__Contact_Id_for_Role__c'){
field.val =contactId;
opt.put(field.fieldname,field.val);
}
}
But, I got too many field describes..
Can any one help me out..
Thanks
Anu
Here the getLimitFieldsDescribes limit Occurs
Maximum 100 Describe is called.
Hi,
I know my code debug shows 101 out of 100 field describes..
But my question is how to overcome this?? How to remove describe statement from for loop???