• steve nabors 7
  • NEWBIE
  • 5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Which is better in an iteration over a Map,  get methods, or an object instance?

Example:

Map<Id, SObject> mapName = new Map<Id, SObject>([ SOQL Query ]);
for (Id key : mapName.keySet()){

EITHER THIS:
var1 = mapName.get(key).field1
var2 = mapName.get(key).field2
var3 = mapName.get(key).field3
.......

OR THIS:
SObject o = mapName.get(key);
var1 = o.field1
var2 = o.field2
var3 = o.field3
.......

 
Hi ,
I was trying to solve the trailhead challenge under "Using Static Resources".

Am getting following message:
Challenge not yet complete... here's what's wrong: 
The page does not include a reference to the specified image

Following code am using.
<apex:page >
            <apex:pageBlock title="Pic" >
                    <apex:pageBlockSection >
                         <apex:image value="{!URLfor($Resource.vfimagetest, '/cats/kitten1.jpg')}"/>
                    </apex:pageBlockSection>
             </apex:pageBlock>
</apex:page>
Am I missing something here?

Regards,
Manjunath C Sarashetti