2011-03-30 65 views
0

每個用戶都有一個名爲「EmployeeID」的用戶配置文件屬性。我想使用emcascript來檢索當前用戶的「EmployeeID」,但不知道如何去做。sharepoint 2010 ecmascript用戶配置文件屬性

 ExecuteOrDelayUntilScriptLoaded(getWebUserData, "sp.js"); 
     var context = null; 
     var web = null; 
     var currentUser = null; 

     function getWebUserData() {  
      context = new SP.ClientContext.get_current(); 
      web = context.get_web(); 
      currentUser = web.get_currentUser(); 
      currentUser.retrieve(); 
      context.load(web); 
      context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod), Function.createDelegate(this, this.onFailureMethod)); 
     } 
     function onSuccessMethod(sender, args) { 
      var currentUser= web.get_currentUser(); 
// how to get employeeID user profile property? 

     } 
     function onFailureMethod(sender, args) { 
      alert('Unable to find your user information.'); 
     } 

回答

相關問題