作成者カテゴリ返答の対象
公開
ボッチ
09/15/2010 04:50 PM
文書リンクアイコン Querydocumentdelete
Re: Querydocumentdelete

アンヌ様

お礼が遅くなりすみません。
ヒント、ありがとうございます。
今、試行錯誤中です。

私の式ですが、どうやら反映されるまでに時間が必要なようです。
ちょうどお昼過ぎのアンヌさんにお返事後、反映されました。
フォームやビューの式はすぐ反映されるのに、
データベーススクリプトは時間がかかりました。
社内のサーバーの関係かしら。。。
また、デバッグですが、何故かできませんでした。
同じ状態でフォームの作業はデバッグできるのに不思議です。
Querydocumentdeleteの作業ではデバッグ画面が表示されません。
「Lotus Scriptのデバッグ」をすれば良いですよね?

ロールを覚える為、今回はロールを使ってやってみようと思っています。
現在作成した式は下記通りです。
まだ式が反映(?)されていないようで、うまく動くか確認できるのはもう少し後になりそうです。

Sub Querydocumentdelete(Source As Notesuidatabase, Continue As Variant)
Dim ss As New NotesSession
Dim cn As String,n As String
Dim ws As New NotesUIWorkspace
Dim f As String,mr As Variant,d As String,i As NotesItem,r As String
Dim uidoc As NotesUIDocument,doc As NotesDocument
Set uidoc=ws.CurrentDocument
Set doc =uidoc.Document
Set i=doc.GetFirstItem("Form")

f="@IsMember(""[提案書削除]"";@UserRoles)"
mr=Evaluate(f,doc)
d=i.Text
If d="Board" Then
If mr(0) = 0 Then
continue = True
Else
If ss.CommonUserName="○○○(私)" Then
Msgbox"削除権限が有りません。"
continue=False
End If
End If
End If

End Sub


[Previous Main Document]
Querydocumentdelete (ボッチ)
. . Re:Querydocumentdelete (アンヌ)
. . . . Re: Querydocumentdelete (ボッチ)
. . . . . . Re:Querydocumentdelete (アンヌ)
. . . . . . Re:Querydocumentdelete (アンヌ)
. . . . . . . . Re: Querydocumentdelete (ボッチ) * 現在地 *
. . . . . . . . . . Re:Querydocumentdelete (アンヌ)
. . . . . . . . . . . . Re: Querydocumentdelete (ボッチ)
. . . . . . . . . . . . . . Re:Querydocumentdelete (アンヌ)
. . . . . . . . . . . . . . . . Re: Querydocumentdelete (寝雪)
. . . . . . . . . . . . . . . . . . Re: Querydocumentdelete (ボッチ)
[Next Main Document]