Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

Get the manager of the current SharePoint user and display it on a text field?

$
0
0

Hi Guys,

I have 2 fields in my NewForm that I would like to be auto-populated.

Initiator field – it should load the current SharePoint user.

Manager of Initiator field – It should contain the Manager of the current SharePoint user.

I was able to auto-populate the Initiator field by this below code (from this post) but I don’t know how to do this for the Manager of Initiator field. Can you guys help me how to achieve this?

<script src="../../Scripts/jquery-1.6.2.js" type="text/javascript"></script><script type="text/javascript" src="/RSQE/SCAR/Scripts/jquery.SPServices-0.7.2.min.js"></script><script type="text/javascript" language="javascript">

 

 

$(document).ready(function() {

    var userName = $().SPServices.SPGetCurrentUser({

        fieldName: "Title"

    });

    $("input[Title='Initiator']").val(userName);   

});</script>

Thank You,

Arnel


Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>