You need to sign in to do that
Don't have an account?
Krishnan Mishra
Can anyone please explain me getmap() method in apex?
i encountered the following
Here what is getMap() method? In which class this method is defined, and what does it do? Also if you can give me more details about this method like can this method be over loaded,what is the return type of this etc etc
Schema.sObjectType.Account.fields.getmap()
Here what is getMap() method? In which class this method is defined, and what does it do? Also if you can give me more details about this method like can this method be over loaded,what is the return type of this etc etc
You can Use the Schema.SObjectType.Account.fields.getMap() that describe result's getMap method to return a map that represents the relationship between all the field names (keys) and the field tokens (values) for an sObject.
The following example generates a map that can be used to access a field by name: