Similar to the approach we took in pulling account information from LinkedIn, we can handle the contacts. The difference is, due to the higher probability of having identical names, we can handle this by asking the system user for some additional information.
You could build a more complex solution that queries based on the first, middle, and last names, and returns all matches for the user to select the correct contact; but that would be a next-level solution, and I would probably consider doing it in something other than JavaScript.
In this solution, I will only ask the system user to input the URL to LinkedIn user profile. From there, I will retrieve the required information and bring in a user profile card.
In order to build this recipe you will need access to a Dynamics CRM instance, as well as have a system customizer or system administrator permission.
In addition, you should create a solution package if one is not already available.
Within your solution package, take the following steps to customize this:
LinkedIn Contact Profile
(new_linkedincontactprofile
).function LinkedInGetContactProfile() { var _contactProfile = Xrm.Page.getAttribute("new_linkedinurl").getValue(); if(_contactProfile != null && _contactProfile != "") { _contactProfile = _contactProfile.substring(_contactProfile.indexOf("linkedin.com/in/")+16, _contactProfile.length+1); $("#new_linkedinurl").after(function(){ var script = '<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script>' + '<script type="IN/MemberProfile" data-id="www.linkedin.com/in/' + _contactProfile + '" data-format="inline" data-related="false"></script>'; return script; }); } }
jQuery
(new_jquery
).LinkedIn Profile
.LinkedIn URL
(new_linkedinurl
). Set the Format to URL.LinkedIn Contact Profile
library that contains our function.LinkedInGetContactProfile()
function to the form OnLoad
event.OnChange
field event.http://www.linkedin.com/in/nicolaetarla
As mentioned at the beginning of this recipe, in this instance we will have the system user do a little bit of leg work. They have to retrieve the contact's public profile. That is an easy enough task using any search engine available and also greatly simplifies the process of sifting through possible multiple users with the same name.
The first part of the script strips out the member name, which could potentially be used in other scenarios. The second part is the standard code presented in the member profile plugin generator.
3.129.73.142