Integrating CRM Accounts with LinkedIn is a very easy step. I have found numerous examples on doing this by using a Web Resource, but I don’t like the way it displays in a frame. It looks anything but professional.
So I decided there’s got to be a better way of doing this.
First off, I am using the jQuery library, so you will need to add that to your resources. It will make it so much easier to select elements on the page.
I have added an on load function to the account:
var nvs_AccountName = Xrm.Page.getAttribute("name").getValue();
‘<script type="IN/CompanyProfile" data-id="’ + nvs_AccountName +
‘" data-format="inline" data-related="false"></script>’;
I am looking for the Account name, as populated in the Name field, and retrieving the LinkedIn profile based on that. I have re-arranged the form to provide the space for the section that will be inserted right below the Account Name field:
In the Form Properties, add your references as below:
once you have all that set up, try opening an account, and you will get the following view:
No more iFrames, it just looks like it belongs there.
The beauty of this approach is also the fact that, if an account is not found on LinkedIn, no problem, the screen will look like so:
NOTE: Please be aware that you will get the following prompt:
Add LinkedIn to your browser’s trusted sites. In the Trusted Sites configuration, click on Custom level.
Set Display Mixed Content to Enable.
This setting can be pushed through a group policy. For more details see KB2625928.