Salesforce: Inject your Javascript to Salesforce standard pages

Salesforce CRM

For sales managers, CRM cloud apps provide real-time visibility into their team’s activities so they can forecast sales with confidence. For sales reps, CRM cloud apps make it easy to manage customer information so reps spend less time handling data and more time with customers.

For marketers, nothing is more important than tracking the sales that result from leads generated through marketing campaigns on your Web site, in email, or with Google AdWords. CRM cloud apps let marketers track leads and sources, route leads to the right salespeople in real time, and provide the analytics to see what’s working and what can be improved. Learn more

Now come to main topic which is injecting Javascript to standard pages:

For this, you must have a developer account on Salesforce.

Here are some steps to inject your Javascript.

  1.  Upload your Javascript as Static Resource in Static Resources Folder as: Go to Setup –> Develop –> Static Resources and Choose a name for your static resource (Javascript file) and upload your file.
  2. After uploading your static resource, go to Setup –> Customize –> Home and create a New link by clicking on New. Enter a Name in Label field.Now choose Behavior to Execute Javascript and leave Content Source to OnClick Javascript. Now paste below code in Textarea field.
    Replace your Static Resource file name with StaticResourceName. Now Save.
  3. Go to Setup –> Customize –> Home –> Home Page Components and in Custom Component section, click on New button. Then Next and here choose a name for your custom component and leave Type default to Links. Here two boxes will be shown. Click on your custom link which will be in Left box and click on Add(>) button. Now save your component.
  4. Go to Setup –> Customize –> Home –> Home Page Layouts and edit the Default layout.Now check your Component from list and click Next and Save your page.

Now You can run your Home page and your custom Javascript will be visible to Home Page.

Thanks For Reading……… 🙂


One thought on “Salesforce: Inject your Javascript to Salesforce standard pages

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s