Adding a LinkedIn Gadget to the Person Summary Screen

Hints, Tips and Tricks

Technical Hints Tips and Tricks that cover customization and development using Sage CRM. API usage and coding are covered.

Adding a LinkedIn Gadget to the Person Summary Screen

  • Comments 1
  • Likes

LinkedIn is one of the most popular Social Media networks and is highly relevant to the business community.   Sage CRM offers within the Interactive Dashboard the ability to research contacts directly in the LinkedIn community.  Please see the article "Using Sage CRM to make LinkedIn work for you" for more details.

LinkedIn provides a number of different tools and resources for developers to be able to include LinkedIn features into websites.  LinkedIn calls these either 'Plugins' or APIs.

Sage CRM offers very easy hooks for you to use the LinkedIn Plugins and APIs within its screens.  The Plugins provide the easiest way of doing this.  Below you can see how I have included a Plugin that will pop up the Contacts details, including their Photo on the screen.  The way this behaves depends on whether you have signed in to LinkedIn or not and draws its data from the contacts public LinkedIn profile.

The code that will call the LinkedIn Plugin is added to the create script of the pers_lastname field in the PersonBoxLong screen.

[code language="javascript"]
Caption = CRM.GetTrans("colnames","pers_lastname")+":";
var strLinkedInProfile = Values("pers_linkedinpublicprofile");
if ((Values("act")==220 || Values("act")==222 || Values("act")==520) && strLinkedInProfile)
{
var strProfileBadge = "<script src='http://platform.linkedin.com/in.js' type='text/javascript'></SCRIPT>";
strProfileBadge +="<script type='IN/MemberProfile' data-id='"+strLinkedInProfile+"' data-format='hover'></SCRIPT>"
Caption += strProfileBadge;
}
[/code] 

Note:  

  1. The Public LinkedIn Profile is held in a new field on the Person entity called  pers_linkedinpublicprofile.  This will be in the form of 
    1. http://www.linkedin.com/pub/simon-yaltoy/16/771/33a
    2. http://www.linkedin.com/in/jtcrichards
  2. To be able to use the full capability of LinkedIn In a full production system you would need to use either the LinkedIn Javascript or REST API.  

Comments
  • Hi Jeff

    Just tried this and I get: pers_lastname jscript error: Expected ']' Line: 2 Char: 6

    Any ides as script looks as above?

    Thanks