Environment : SP 2010
I have a custom property in User Profile called CompanyCode
.
I need to fetch this property using javascript/jquery in a master page. Can anyone let me know how to fetch custom property from user profile.
I used
var companyCode = $().SPServices.SPGetCurrentUser({
fieldName: "CompanyCode"
});
alert(companyCode);
returned empty string.
Note :
I have also tried default properties but no result.
var companyCode = $().SPServices.SPGetCurrentUser({
fieldName: "CompanyCode"
});
alert(companyCode);
Let me know how can I achieve this?
Edit: Now I have taken SP.Profile.js file from 2013 environment and referenced it. Still facing issue.