Basically as the title says how can I find out which of my user profile properties are in the edit page using javascript. my code is :
varMyProperties,
getMyNewsChoices =function(){// Get the current client context and PeopleManager instance.var clientContext = SP.ClientContext.get_current();var peopleManager =new SP.UserProfiles.PeopleManager(clientContext);// Get user properties for the target user.// To get the PersonProperties object for the current user, use the// getMyProperties method.MyProperties= peopleManager.getMyProperties();// Load the PersonProperties object and send the request.
clientContext.load(MyProperties);
clientContext.executeQueryAsync(getMyNewsChoicesSuccess, getMyNewsChoicesFail);},
getMyNewsChoicesSuccess =function(){//get the news choice by actually fieldnamevarMyChoices= JSON.stringify(MyProperties.get_userProfileProperties());
$('#NBStest').text(MyChoices);},
getMyNewsChoicesFail =function(){
alert("FAIL");}return{
getMyNewsChoices: getMyNewsChoices}})();
$(document).ready(function(){
SP.SOD.executeFunc('SP.js','SP.ClientContext',function(){// Make sure PeopleManager is available
SP.SOD.executeFunc('userprofile','SP.UserProfiles.PeopleManager',function(){NBSProfileInfo.NewsPersonalisation.getMyNewsChoices();});basically I found an IsVisibleOnEditor for powershell is there a similar sort of thing for javascript??