1

我有一個來自excel的用戶列表。 我們的所有用戶在系統上都有一個通用的僱員ID號碼。 我想比較一下Employe ID,如果與Employee ID相匹配,它會從excell列表中更新公司,標題和部門信息。 我需要一個蓮花腳本請幫我:)如何更改IBM Lotus用戶信息標題和公司字段

enter image description here

回答

1

你需要做的第一件事是添加由員工ID索引到Domino目錄的新觀點。我們稱之爲「員工ID」。然後,你需要編寫打開Domino目錄數據庫代碼:

dim s as new NotesSession 
dim myDb as new NotesDatabse("yourServer","names.nsf") 
myView = myDb.GetView("Employees by ID") 

之後,你的代碼將讀取從電子表格輸入到變量theEmployeeId,theDepartment和theCompany,其次是這樣的代碼:

dim doc as NotesDocument 
doc = myView.GetDocumentByKey(theEmployeeId) 
if not doc is nothing then 
    doc.ReplaceItemValue("Title",theTitle) 
    doc.ReplaceItemValue("Department",theDepartment) 
    doc.ReplaceItemValue("CompanyName",theCompany) 
    doc.Save(true,false,false) 
end if 
+0

非常感謝你 –

相關問題