Menu Color:
Banner Color:
Main Color:
Header Image:
  • background1
  • background2
  • background3
  • background4
  • background5
  • background6
  • background7
  • background8
  • background9
en-USes-ES
Search
en-USes-ES
May 26, 2017
You are here : Computer Blog
Blog Archive
View Blog
 
     

Add Linked in to Microsoft Dynamics in an iFrame

Nov 23 2008

Thanks to Matt Wittermann https://community.dynamics.com/blogs/cscrmblog/comments/4903.aspx for starting me on this. This is an update to his solution seperating the LinkedIn HTML code from a specific CRM entity using a parameter passed to the HTML window.

Here is my solution, there are two parts, the HTML code and two lines of Java for the forms OnLoad event.

  1. Create an iFrame in the form you want to add LinkedIn to.
  2. Set the source to About:Blank.
  3. Add the LinkedIn.html to a folder on your site, typically someware under the ISV folder.
  4. Add the OnLoad code to your form. Adjust the name of the iFrame and the path as required.

LinkedIn.html
<html>
 <head>
  <script src="http://www.linkedin.com/companyInsider?script&useBorder=no" type="text/javascript"></script>
  <script type="text/javascript">
  function querySt(ji) {
   hu = window.location.search.substring(1);
   gy = hu.split("&");
   for (i=0;i<gy.length;i++) {
    ft = gy[i].split("=");
    if (ft[0] == ji) {
    return ft[1];
    }
   }
  }
  </script>
 </head>
 <body>
  <center><span id="getlinkedin"></span></center>
  <script type="text/javascript">
   var companyName = querySt("companyname");
   new LinkedIn.CompanyInsiderBox("getlinkedin",companyName);
  </script>
 </body>
</html>

 

 

OnLoad Java code
var companyName=crmForm.all.name.DataValue;
crmForm.all.IFRAME_LinkedIn.src='/ISV/LinkedIn/linkedin.html?companyname=' +companyName;