In dynamic APEX, as mentioned by SF that describe calls are heavy. So when we do the following
Schema.getGlobaldescribes()
- it picks org's all objects.Schema.getGlobaldescribes().get(SObjectAPIName)
- does it pick only specific SObject mentioned in get() or start from left to right of the dot i.e. 1st will pick all the org's sObjects and then specific object.
Reason- I have a specific number of objects say 2, child and parent. Want to show the label of the fields on the basis of the user's input in a box having comma-separated API name of the fields. There is a need to show the label of the fields the user entered earlier. e.g. Field : Account.Name,Title,FirstName, LastName (all contact fields)
Label of the input boxes should be
Account Name = (value by user)
Title = (value by user)
The answer will allow me to decide to do describe calls ones and play with them (but will be heaviest) or play with dot notation to reduce the burden on processing time.
get
call operates on the map already retrieved this necessarily has exactly the same poor performance as making the call to fetch the map then get the value from the map in a separate statement.