【问题标题】:How to disable iNotes for a single mail file如何为单个邮件文件禁用 iNotes
【发布时间】:2015-10-16 23:38:56
【问题描述】:

应该很简单,但 IBM 并没有让它变得简单……

通过 HTTP 访问邮件文件时如何不使用 iNotes。

我想访问我的邮件文件的自定义视图和表单,但我似乎无法绕过 iNotes。服务器总是给我一个 iNotes 页面而不是我的表单。

如果我使用旧的邮件文件模板,它会起作用,但在较新的邮件模板中的某处有一个“开关”,表示使用 iNotes。

显然,我仍然想要 HTTP,而不是这个邮件文件上的 iNotes——我不想使用旧的电子邮件模板。 “开关”在哪里?

提前致谢。

【问题讨论】:

  • 您发送的是什么网址?您对邮件文件设计做了哪些更改?
  • URL 是 //hostname/mail/mailfile.nsf/0/ba4b8dbec6ae52908625740500014d92?OpenDocument 。我尝试了几次设计更改,但都没有改变任何东西。目前我正在使用来自另一个数据库的旧备忘录表单,它不会启动 iNotes,但它还没有解决问题。

标签: lotus-notes lotus-domino lotusscript lotus-formula


【解决方案1】:

您可以通过添加 URL 参数来强制使用“经典”用户界面:

hxxp://yourserver.yourdomain.com/mail/mailfile.nsf?OpenDatabase&ui=webmail

同样适用于打开视图:

hxxp://yourserver.yourdomain.com/mail/mailfile.nsf/YourView?OpenView&ui=webmail

如果您想完全禁用 iNotes 的邮件文件而不进行 URL 黑客攻击,那么您可以删除相应 FormsX.nsf- 文件的“链接”。此链接存储在数据库图标中。图标文档包含一个名为$FormsTemplateFile 的项目。 当 R9 中仍然指向 Forms85.nsf 的德语模板出现问题时,这个“上下文”已经被揭露了。详情请查看this link at IBM。该链接中的代码也可用于通过删除“链接”项来解决您的问题:

Dim sess As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim item As NotesItem
Dim newFF As String
Dim itemFF As NotesItem

Set db = sess.CurrentDatabase
Dim session As New NotesSession

Dim n As String
Set db = session.CurrentDatabase
n = "FFFF0010"
Set doc = db.GetDocumentByID (n)

' original code from post
'Set itemFF = doc.GetFirstItem("$FormsTemplateFile")
'newFF = Inputbox("Enter new Forms File name", "Change Forms File", itemFF.values(0))
'Set item = doc.ReplaceItemValue("$FormsTemplateFile", newFF)

'new line to fix problem
Call doc.RemoveItem( "$FormsTemplateFile" )
Call doc.save(True,True)

这行得通,因为在每个数据库中,图标都有相同的修复 noteid。

【讨论】:

  • 谢谢,这确实覆盖了 iNotes。但是从 URL 中删除 ui=webmail 参数仍然允许使用 iNotes 表单及其所有按钮/功能查看邮件文档(网络爬虫尝试多种形式的 URL)。有没有办法在设计中的某处表明这是一个不连接到 iNotes 的邮件文件?
  • 我知道,在 database- 图标中有一个链接到项目“$FormsTemplateFile”中使用的 FormsX.nsf。如果您以编程方式从数据库中删除“$FormsTemplateFile”- 可能会停止使用 iNotes 图标的项目...
  • 天哪,藏东西的好地方! Torsten,如果您更新答案,我可以将其标记为解决方案。谢谢!
【解决方案2】:

感谢 Torsten 提供 2 个选项。

我不妨详细描述一下解决方案:

Domino Designer 中,打开数据库 Resources 文件夹中的 Icon

点击Properties标签,选择Document IDs,然后复制Note ID——在我的例子中值为@987654321 @。

在 LotusScript 中运行以下代理:

Sub Initialize
   Dim session As New NotesSession
   Dim db As NotesDatabase
   Dim iconDoc As NotesDocument

   Set db = session.CurrentDatabase
   'NoteID of icon document from icon properties
   Set iconDoc = db.GetDocumentById("11E")

   'Delete the field $FormsTemplateFile
   Call iconDoc.RemoveItem("$FormsTemplateFile")

   Call iconDoc.Save(True, True)

End Sub

这将通过 NoteID 获取图标设计文档,您可以从中修改任何“隐藏”的字段。删除 $FormsTemplateFile 会断开邮件文件使用 iNotes 的连接。干杯。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-12-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多