I currently managed to display some images(from salesforce Documents folder) on an extracted Excel sheet from Salesforce but I have hard coded the document Ids. So this might not work after creating package and after installing to different orgs.
I'm looking for a way to get the document Ids without hard coding them. Is there any way doing this ?
Apex Code:-
movementDirUp = System.URL.getSalesforceBaseUrl().toExternalForm().replace('https','http')+'/servlet/servlet.ImageServerid=015240000005U3V&oid='+UserInfo.getOrganizationId();
movementDirDown = System.URL.getSalesforceBaseUrl().toExternalForm().replace('https','http')+'/servlet/servlet.ImageServer?id=015240000005U3T&oid='+UserInfo.getOrganizationId();
movementDirRight = System.URL.getSalesforceBaseUrl().toExternalForm().replace('https','http')+'/servlet/servlet.ImageServer?id=015240000005U3U&oid='+UserInfo.getOrganizationId();
//Map to display images
mapClimateMovement = new Map<String, String>{'climate_up_arrow' => movementDirUp , 'climate_down_arrow' => movementDirDown , 'climate_right_arrow' => movementDirRight.toLowerCase()};
Visualforce Code:-
<apex:image value="{!IF(CONTAINS(reportRow.parentInfo[field],'Up'),mapClimateMovement['risk_climate_up_arrow'],'')}" rendered="{!CONTAINS(reportRow.parentInfo[field],'Up')}" />
<apex:image value="{!IF(CONTAINS(reportRow.parentInfo[field],'Down'),mapClimateMovement['risk_climate_down_arrow'],'')}" rendered="{!CONTAINS(reportRow.parentInfo[field],'Down')}" />
<apex:image value="{!IF(CONTAINS(reportRow.parentInfo[field],'Level'),mapClimateMovement['risk_climate_right_arrow'],'')}" rendered="{!CONTAINS(reportRow.parentInfo[field],'Level')}"/>