You need to sign in to do that
Don't have an account?
rohit.mehta
Schema.SObjectType.Opportunity.fields.getMap() Returns Empty Map
Hi,
I want to be able to get all the fields for the Opportunity. I am writing custom code for cloning an opportunity.
I had the following piece of code which was working but suddenly has stopped working.
This now returns an empty map.
Any ideas why this call would return an empty map.
Thanks,
Rohit
I want to be able to get all the fields for the Opportunity. I am writing custom code for cloning an opportunity.
I had the following piece of code which was working but suddenly has stopped working.
Code:
Map<String, Schema.SObjectField> m = Schema.SObjectType.Opportunity.fields.getMap(); System.debug('isEmpty = ' + m.isEmpty());
This now returns an empty map.
Any ideas why this call would return an empty map.
Thanks,
Rohit
It was the API restriction.
Rohit
All Answers
It was the API restriction.
Rohit
Prev message here
Mike
I am facing the same problem. Any one have any solution?
Thanks,
Naresh
I solved the problem. Pls open the your managed package detail page in "Installed Packages" menu. The check the API Access option. That should be unrestricted.
Thanks,
Naresh