Skip to main content
Need to select the component to have it show up in the layout
Source Link
metadaddy
  • 16.5k
  • 5
  • 57
  • 103

The only way we found to insert code directly into the DOM of any Salesforce page is via a Home Page Component (Setup > Customize > Home > Home Page Components).

Create a New Custom Component, Type = HTML Area. In the editor, check the "Show HTML" checkbox in the upper right. You can then put in arbitrary HTML and JavaScript and it can traverse the DOM.

If you just want your code on a single page, create a "Wide (Right) Column" component and add it to your page layout.

If you want the code to run on every* page in SFDC, then you'll want to put it into a "Narrow (Left) Column" (often referred to as the sidebar) component and, check the Setup > Customize > User Interface > Show Custom Sidebar Components on All Pages checkbox, and finally select it in Setup > Customize > Home > Home Page Layouts > your layout.

Home Page Components don't need to have any visible UI.

  • Chatter pages don't have the sidebar, so this won't work there. The Service Cloud Console also doesn't show the sidebar and has no equivalent, so you can't do this there either.

The only way we found to insert code directly into the DOM of any Salesforce page is via a Home Page Component (Setup > Customize > Home > Home Page Components).

Create a New Custom Component, Type = HTML Area. In the editor, check the "Show HTML" checkbox in the upper right. You can then put in arbitrary HTML and JavaScript and it can traverse the DOM.

If you just want your code on a single page, create a "Wide (Right) Column" component and add it to your page layout.

If you want the code to run on every* page in SFDC, then you'll want to put it into a "Narrow (Left) Column" (often referred to as the sidebar) component and check the Setup > Customize > User Interface > Show Custom Sidebar Components on All Pages checkbox.

Home Page Components don't need to have any visible UI.

  • Chatter pages don't have the sidebar, so this won't work there. The Service Cloud Console also doesn't show the sidebar and has no equivalent, so you can't do this there either.

The only way we found to insert code directly into the DOM of any Salesforce page is via a Home Page Component (Setup > Customize > Home > Home Page Components).

Create a New Custom Component, Type = HTML Area. In the editor, check the "Show HTML" checkbox in the upper right. You can then put in arbitrary HTML and JavaScript and it can traverse the DOM.

If you just want your code on a single page, create a "Wide (Right) Column" component and add it to your page layout.

If you want the code to run on every* page in SFDC, then you'll want to put it into a "Narrow (Left) Column" (often referred to as the sidebar) component, check the Setup > Customize > User Interface > Show Custom Sidebar Components on All Pages checkbox, and finally select it in Setup > Customize > Home > Home Page Layouts > your layout.

Home Page Components don't need to have any visible UI.

  • Chatter pages don't have the sidebar, so this won't work there. The Service Cloud Console also doesn't show the sidebar and has no equivalent, so you can't do this there either.
added 286 characters in body
Source Link

The only way we found to insert code directly into the DOM of any Salesforce page is via a Home Page Component (Setup > Customize > Home > Home Page Components).

Create a New Custom Component, Type = HTML Area. In the editor, check the "Show HTML" checkbox in the upper right. You can then put in arbitrary HTML and JavaScript and it can traverse the DOM.

If you just want your code on a single page, create a "Wide (Right) Column" component and add it to your page layout.

If you want the code to run on every* page in SFDC, then you'll want to put it into a "Narrow (Left) Column" (often referred to as the sidebar) component and check the Setup > Customize > User Interface > Show Custom Sidebar Components on All Pages checkbox.

Home Page Components don't need to have any visible UI.

  • Chatter pages don't have the sidebar, so you can't do anythingthis won't work there. The Service Cloud Console also doesn't show the sidebar and has no equivalent, so you can't do this there either.

The only way we found to insert code directly into the DOM of any Salesforce page is via a Home Page Component (Setup > Customize > Home > Home Page Components).

You can put in arbitrary HTML and JavaScript and it can traverse the DOM.

If you want the code to run on every* page in SFDC, then you'll want to put it into a sidebar component and check the Setup > Customize > User Interface > Show Custom Sidebar Components on All Pages checkbox.

Home Page Components don't need to have any visible UI.

  • Chatter pages don't have the sidebar, so you can't do anything there. The Service Cloud Console also doesn't show the sidebar and has no equivalent, so you can't do this there either.

The only way we found to insert code directly into the DOM of any Salesforce page is via a Home Page Component (Setup > Customize > Home > Home Page Components).

Create a New Custom Component, Type = HTML Area. In the editor, check the "Show HTML" checkbox in the upper right. You can then put in arbitrary HTML and JavaScript and it can traverse the DOM.

If you just want your code on a single page, create a "Wide (Right) Column" component and add it to your page layout.

If you want the code to run on every* page in SFDC, then you'll want to put it into a "Narrow (Left) Column" (often referred to as the sidebar) component and check the Setup > Customize > User Interface > Show Custom Sidebar Components on All Pages checkbox.

Home Page Components don't need to have any visible UI.

  • Chatter pages don't have the sidebar, so this won't work there. The Service Cloud Console also doesn't show the sidebar and has no equivalent, so you can't do this there either.
Source Link

The only way we found to insert code directly into the DOM of any Salesforce page is via a Home Page Component (Setup > Customize > Home > Home Page Components).

You can put in arbitrary HTML and JavaScript and it can traverse the DOM.

If you want the code to run on every* page in SFDC, then you'll want to put it into a sidebar component and check the Setup > Customize > User Interface > Show Custom Sidebar Components on All Pages checkbox.

Home Page Components don't need to have any visible UI.

  • Chatter pages don't have the sidebar, so you can't do anything there. The Service Cloud Console also doesn't show the sidebar and has no equivalent, so you can't do this there either.