Hello,
I am using SPService to get the current user office name in Office365 but it is not working as expected.
The code is as below…
<script src=”/SiteAssets/jquery-1.3.2.min.js” type=”text/javascript”></script>
<script type=”text/javascript” src=”//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min.js”></script>
<script type=”text/javascript”>
$(document).ready(function(){
var thisUser = $().SPServices.SPGetCurrentUser();
alert(thisUser);
var userOffice = $().SPServices.SPGetCurrentUser({
fieldName: “Office”,
debug: false
});
alert(userOffice);
});
</script>
Help Me Out ……
Thanks in Advance…
Its all depend on Sync policy what you adopted. It may or may not check your policy.
For your previous question check your console what is error? after page load click f12 and check console. with alert you can also add console.log(thisUserOffice).