第一步提出申请给部门主任审批流转正常,到了第二步就服务器报错:agent error:你没有此项操作的权限。原因出在doc.save事件,到了这个代码就提示,这涉及的权限问题跟ACL有关还是就是读者域和作者域的问题呢?
Sub Initialize
Dim ns As NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set ns =New NotesSession
Set db=ns.CurrentDatabase
Set doc=ns.DocumentContext
Dim item As NotesItem
If doc.docStatu(0)="提出申请" Then
doc.form="apply"
Set item =New NotesItem(doc,"docauthors",doc.applydept(0),AUTHORS)
Set item =New NotesItem (doc,"docreaders",doc.applyer(0),READERS)
Set item=New NotesItem (doc,"DOCManagers","admin/SH.Unicom",AUTHORS)
Call doc.ReplaceItemValue("docStatu","部门主任审批")
Else
If doc.docStatu(0)="部门主任审批" Then
Call doc.ReplaceItemValue("docauthors",doc.manager(0))
Call doc.AppendItemValue("docreaders",doc.applydept(0))
Call doc.ReplaceItemValue("docStatu","总经理审批")
Else
If doc.docStatu(0)="总经理审批" Then
Call doc.ReplaceItemValue("docauthors",doc.hr(0))
Call doc.AppendItemValue("docreaders",doc.manager(0))
Call doc.ReplaceItemValue("docStatu","送人力资源归档")
Else
If doc.docStatu(0)="送人力资源归档" Then
Call doc.ReplaceItemValue("docauthors","")
Call doc.AppendItemValue("docreaders",doc.hr(0))
Call doc.ReplaceItemValue("docStatu","存档")
End If
End If
End If
End If
Call doc.Save (True,False)
Print "<script>alert('已成功流转到下一步,下一步的活动者为:"+doc.docauthors(0)+"')</script>"
Print "<script>window.close()</script>"
End Sub