Summary:
The purpose of this BLOG posting is to provide instruction on how to add in a link to LinkedIn for persons onto the Person Summary Screen. A zipped pdf file has been created for users to take these instructions with them, click here to download the pdf.
Assumptions:
During this discussion I will be presenting how to link the Person Entry Screen to LinkedIn.
-
Please note this code assumes that the user is always on-line, i.e. connected to the internet, errors will result if an attempt is made to use the following documented behavior without an internet connection.
-
Additionally, this code assumes that the user has a current LinkedIn account and has configured their LinkedIn login to be remembered so that the user merely has to navigate to the site to have access to their LinkedIn profile. If the user chooses to log-in to the LinkedIn site each time they visit LinkedIn then this sample code will require this login to occur every time.
Prerequisites:
SageCRM 6.2, this code has been written in a way that will allow it to function within SageCRM on-premise and/or SageCRM.com. There are other ways of achieving the same result which require the use of Server Side code, in an effort to make this code work for all of our existing clients I modified the code shared with me to work client side only.
Installation Instructions:
1. In order to use this customization you must navigate to Administration | Customization | Person Entity | Screens Tab | select the Person Summary Screen.
2. Once you are in the properties for the screen copy the below code and paste it into the Custom Content for Person Entry Screen:
Beginning of Code
<script>
window.onload = function(){
var persfirstname = document.getElementById('_Datapers_firstname').innerText;
var perslastname = document.getElementById('_Datapers_lastname').innerText;
var compname = document.getElementById('_Datacomp_name').innerText;
var captpersfirstname = document.getElementById('_Captpers_firstname').innerText;
var xlink = "http://www.linkedin.com/search?search=&lname="+perslastname+"&fname="+persfirstname+"&company="+ compname;
var xURL = "<a href=" + xlink + " target=_blank><img src=http://www.linkedin.com/img/icon/icon_company_insider_in_12x12.gif border=0 title='Find in LinkedIN'></a>";
document.getElementById('_Captpers_firstname').innerHTML += xURL;
}
</script>
End of Code
3. Once the code is copied into the screen, click the save button to save the screen modifications.
Testing Instructions:
1. To test this customization navigate to the Main Menu and find or select a Person record.
2. Once a person record is selected a LinkedIn icon should appear next to the label for the person first name.
3. Click on the LinkedIn icon, a separate screen should appear launching and navigating the user to the Person Search screen found within LinkedIn’s site.
A special thanks to the following two chaps for contributing to the final solution. Without their assistance this would not have been possible.
Alistair Hill
Consultant
Plus Computer Solutions Ltd.
Phone: 604.420.1099
e-mail: alistair@plus.ca
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ken Schmitt
Advanced CRM Certified Consultant
London ON, Canada
e-mail: ken@schmitts.ca
website: http://s5.schmitts.ca