Gubbas Digi Communications

Gubbas Digi Communications

Wednesday 22 June 2016

How to display the image that is stored in documents and static resources




   <apex: image> :
               This tag is used to display the image in VF pages.


    Syntax for the image stored in static resources.

        <apex:image id="theImage" value="{!$Resource.resource_name}" width="50" height="50"/>


   Syntax for the image stored in Documents.

       <apex:image id="theImage"
              value="https://c.<Instance>.content.force.com/servlet/servlet.ImageServer?
               id=<document_Id> &oid=<organization_id>" width="50" height="50" />

       Here,     <instance> represents a part of salesforce account url
           ex: https://ap1.salesforce.com/home
                ap1----------> instance
           
          <document_id> represents the image id where it is stored.

       <organization_id> represetns the organization id
             
                        steps to find the organization_id
                1. Go to setup
                2. Search "company information" in the quick find box.
                3. you find the salesforce.com organiztion_id or you check in the url
  


1 comment:

  1. The Best Casino | DrmCDC
    › gambling-online › best-casino- 광주광역 출장마사지 › gambling-online › best-casino- 1 answerDr.Mcd searches hundreds of casinos, all under one roof, and 창원 출장샵 finds the best casino 의왕 출장마사지 that 천안 출장안마 has all the slots games 김천 출장마사지 for you. From slots, live games,

    ReplyDelete