一篇待办事宜,本来是A的,现在想让B也能看到
因为是分类视图显示,key列是to域
所以,我把to从单值域改为了多值域,然后写了一个代理
key = "A "
Set view = db.GetView ( "dbsy " )
Set doc = view.GetDocumentByKey (key)
然后
i=1
While Not(doc Is Nothing)
If doc.to(0)= "A " Then
tt=Evaluate( "@setfield( 'to ';to: 'B ') ",doc)
tt=Evaluate( "@Setfield( 'reader ';readere: 'B ') ",doc)
Call doc.Save(True, True )
Msgbox i
End If
Set doc = view.GetNextDocument(doc)
i=i+1
Wend
i msg出来的数目是对的,可是程序运行完以后,B登录进入只能看到部分A的待办事宜,而不是全部,不知道到底是哪里出了问题,大家有没有更好的建议?实在不明白到底哪里出了问题,很郁闷。
------解决方案--------------------
Dim itemReaders As New NotesItem(doclog, "Readers ", " ")
itemReaders.IsReaders=True
Set nam = New NotesName(B)
Call itemReaders.AppendToTextList(Cstr(nam.Canonical))
Call doc.save(True,False)