-1

Hard code Id Problem in Home page componenet

I have created a home page component Image type. I have selected image from document folder, and now it is showing as a hard coded id, How I can avoid this hard code id .

  • Have you looked into using a static resource instead? – Girbot Feb 9 '16 at 7:19
  • Here we can not use static resources. – Ravikant Kedia Feb 9 '16 at 11:13
  • That would be helpful to add to your question and also why. – Girbot Feb 9 '16 at 11:15
  • 1
    This looks standard home page component layout. When you upload the image, salesforce generates the image tag automatically referring the document you uploaded. Are you asking how to stop SFDC from generating the image tag with id's? – Shailesh Deshpande Feb 9 '16 at 12:07
1

Go to Setup / Develop / Static Resources. You can upload image files here and refer to them by name (e.g. /resource/myImage). You can also migrate these files as part of a change set.

| improve this answer | |
1

Are you are asking on how to hide the Body tag inside the Home Page Component? then the answer is you cannot edit the layout of Home Page Component

You can only edit the Home Page Layout using the Number of Home page components

You can only assign links, image, etc and can add them to Home Page....

| improve this answer | |
0

The image you have posted is of the Home Page Component's detail page which is defined by SFDC. If you want to add this component to the home page layout, you have to go

Setup-->Customize-->Home-->Home Page Layout 

and add the component to the layout(Check the checkbox against the component).

In case, you want to view what the image is, you can directly go the image URL which is specified in src and see it.

Hope this helps.

| improve this answer | |
  • I am asking , How to avoid hard code id? – Ravikant Kedia Feb 9 '16 at 7:11
  • Why do you need the ID to be dynamic? How you are going to use the SFDC standard record layout. Could you please explain? – Shailesh Patil Feb 9 '16 at 7:18
  • Hard code is is not a best practise. – Ravikant Kedia Feb 9 '16 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.