Following are a few static resources in Salesforce −
◉ Images
◉ Javascript Files
◉ Flash files
◉ CSS files
The steps to create a static resource are as below.
Create a Static Resource container
Go to Develop → Static resource and mention the values for name, description and file location for the static resource.
Upload a Static Resource
Click Save in the above screen to get the file attached to the User Interface controller.
Reference the Static Resource
Next we create the apex code as in the following screenshot to reference the static object we created above.
Output
Running the above apex code will generate the following output. The output shows a static resource.
No comments:
Post a Comment