Tuesday, December 22, 2009

MySite Profile Hierarchy Does not Display a Direct Report

One of my customers had an interesting issue. Here is the situation:

  • My customer, Sally, reported to Mr. Smith.
  • Jan, Stan and Ann also reported to Mr. Smith.
  • Sally did not show up in Mr. Smith's hierarchy on his MySite profile as reporting to him. However, Jan, Stan and Ann did. 
  • Sally's MySite showed her as reporting to Mr. Smith in her own hierarchy!

It was a puzzle. It was complicated by the fact that the company I work for has multiple ways of pulling data into Active Directory. I first checked out AD, thinking there was a profile error. No dice. Then I checked to make sure the jobs that populated AD did not have issues and was actually pulling and populating the data as designed. Again, not the problem. It turns out I was way overthinking the problem.

The issue is that Mr. Smith had entered Sally's name as his Assistant when he was filling out his profile. When he removed her as his assistant, she displayed properly in the hierarchy.

I assume this is a bug, rather than by design. The assistant property is a manually entered property, even though it is a lookup. This property, when filled out, overrides the hierarchical data pulled from AD. Clever, but when I am looking at the direct reports of a manager, I would not think to gather information from the assistant text box as well. Except now maybe I will...

Tuesday, December 8, 2009

Redirect using a Content Editor Web Part

I am not a web developer, so when someone asked me to create a redirect for a page, I was at a loss. Then someone told me to use a Content Editor Web Part. Wow. It really is that simple.

Add the CEWP to the page. Then click Edit Shared Web Part and click on Source Editor.

Modify the code below to include the site you want to redirect to and add any pertinent text. The HTML below redirects in 5 seconds, but you can shorten or lengthen that by changing the setTimeout.

<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!--
function redirectsp()
{
top.location="http://YOURSITE HERE";
}
if (top.frames.length==0)
{
setTimeout('redirectsp()',5000);
}
//-->
</SCRIPT>
</HEAD>
<body>
<TABLE width=70% align=center cellpadding=10><TBODY bgcolor=#EOEBED><TR><TD><STRONG><FONT size=4 color=#59452A><BR>You will be redirected here: <FONT face=Verdana><A href="http:/yoursite/default.aspx">http://yoursite/default.aspx</A> Please bookmark it for future reference. You will be redirected in 5 seconds or you may click on the link to go there immediately.<BR><BR></FONT></FONT></STRONG></TD></TR></TBODY></TABLE>
</body>
</html>