Ads

Tuesday 17 September 2013

Using static resource Dynamically in Salesforce?

Let’s suppose we have an archive in static resource with name “Contact” and you want to use this static resource on a page that displays Contact Photos dynamically. Assumption is that the images are stored with same name as product codes.
Code:

//Declare an apex variable which gets the Contact code from an apex property
<apex:variable var="contact_photo" value="{!contactPhoto}.jpg"/>
<img src="{!URLFOR($Resource.Products,contact_photo)}')" alt="" />

6 comments:

  1. Salesforce is most popular, powerful and flexible web based database available in the market. This system delivers enhanced customer relation management through cloud technology. FITA is salesforce training institutes in Chennai at most competitive price.

    ReplyDelete
  2. This is definitely one of the best articles I have read in this website! Thanks Mate.

    Salesforce Training Institutes in Chennai

    ReplyDelete
  3. This is really nice article.......... Salesforce can help you get the most out of the platform.Training is required for someone to gets introduced to a new job or roll out a business change.For more details salesforce online training in hyderabad

    ReplyDelete
  4. Briltus Technologies offer the most effective real time practical oriented Salesforce Training . Our sessions help your group to quickly procure the power they need. Gain from Affirmed specialists as they show building applications regulated and apply what you understand with hands-on activities.
    Visit: http://www.briiltus.com

    ReplyDelete
  5. This site helps to clear your all query. rajasthan university bcom final year result
    uniraj ba 3rd year result This is really worth reading. nice informative article.

    ReplyDelete