2015-11-03 51 views
0

某些字段的「其他」一選項爲多個值: AD fields screenshot增值「其他」屬性在Active Directory中的AD

我試着用下面的代碼添加新值這個領域:

if (Domaincontact.Telephones.Faxes != null) 
    { 
    foreach (var fax in Domaincontact.Telephones.Faxes) 
     { 
     if(activeDirectoryContact.Properties[FAX].Contains(fax)) continue; 
      activeDirectoryContact.Properties[FAX].Add(fax); 
     } 
    } 
activeDirectoryContact.CommitChanges(); 

但最後的代碼行後有一個例外:

ExtendedErrorMessage = "00002081: AtrErr: DSID-031517FA, #2:\n\t0: 00002081: DSID-031517FA, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 17 (facsimileTelephoneNumber)\n\t1: 00002081: DSID-031517FA, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 17 (facsimileTelephoneNumber)\n" 

哪些錯誤與AD? ; D有人能告訴我我缺少什麼嗎?

+0

FAX –

回答

0

好的。我自己想通了。這裏的link爲AD字段的說明。我的方案將是:

otherFacsimileTelephoneNumber

及其他:在這個例子中`FAX = 「facsimileTelephoneNumber」`

otherHomePhone otherIpPhone otherLoginWorkstations otherMailbox otherMobile otherPager otherTelephone

相關問題