Pulling a company profile from the data they maintain is always a better idea than having to maintain that information yourself. While we won't be able to have all customers update all the profile information we need to track, bringing in some information from their public profiles will always make things easier on our team.
In this recipe we will look at a simple way of bringing a customer's LinkedIn card information on their profile page. In addition, this pull of data happens exclusively on the client side.
In order to test this solution, you will need access to a Dynamics CRM instance and be a part of system customizer or system administrator permission.
You can create a new solution package or reuse an existing one.
Perform the following steps to add the LinkedIn company card to your CRM Account form:
LinkedIn Company Profile
(new_LinkedInCompanyProfile
).function LinkedInCompanyProfile() { var _companyName = Xrm.Page.getAttribute("name").getValue(); if(_companyName != null && _companyName != "") { while(_companyName.indexOf(" ") != -1) { _companyName = _companyName.replace(" ", "-"); } _companyName = _companyName.toLowerCase(); $("#name").after(function(){ var script = '<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script>' + '<script type="IN/CompanyProfile" data-id="' + _companyName + '" data-format="inline" data-related="false"></script>'; return script; }); } }
jQuery
(new_jquery
).jQuery
resource.LinkedIn Company Profile
web resource.OnLoad
event handler, add a reference to your LinkedInCompanyProfile()
function.OnChange
event, and reference your LinkedInCompanyProfile()
function.Using the value of Account Name defined as the name of the company, this script retrieves the company card from LinkedIn and displays it on the form, right under the Account Name field. With it, you get a link back to the company profile in LinkedIn, along with the company name, the logo, and a short description.
Please be aware that this functionality does not perform a search of companies on LinkedIn, but rather it looks-up a company by its exact name defined in the Account Name field. For situations where the stored account name is different than the company name defined in the LinkedIn profile, a new custom field can be created to capture the publicly available company name.
This example uses jQuery only for page location and to insert the actual card after the account name. You could easily change the location of the company card by selecting any other tag on the page.
3.136.18.65