Отправляет email-рассылки с помощью сервиса Sendsay

Бюллетень "Lotus Notes CodeStore"

  Все выпуски  

Бюллетень "Lotus Notes CodeStore" No 98 от 2008-11-05


Рассылку ведет: Программист на Lotus NotesLotus CoderВыпуск No 98 от 2008-11-05
рассылка о программировании на Lotus Notes/Domino
Обсуждения на форумах, блогах. Примеры программного кода на LotusScript,@formula, Java

рассылка:выпускархивлентаблогсайт

Бюллетень "Lotus Notes CodeStore" Выпуск 13 от 21.04.2008

comp.soft.prog.lotuscodesrore

CodeStore. Примеры кодов

Public Function GetEmailCreatedDate(doc As NotesDocument) As String
' returns a date the document/email should be considered created
' posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/1D9C645C986EAF74862574EF0061CBBB
' written by Mike Mortin 20080625
If doc.DeliveredDate(0) <> "" Then
GetEmailCreatedDate = doc.DeliveredDate(0)
Elseif doc.PostedDate(0) <> "" Then
GetEmailCreatedDate = doc.PostedDate(0)
Else
GetEmailCreatedDate = doc.Created
End If
End Function
Public Function GetDocFromDb( db As NotesDatabase, viewName As String, key() As Variant, exact As Boolean ) As NotesDocument
' returns the first doc based on a search key
' postted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/D8474BE8C4FEEB35862574EF00628013
' written by Mike Mortin
Dim view As NotesView ' get the view
Set view = db.GetView(viewName) ' get the doc from the key
Set GetDocFromDb = view.GetDocumentByKey(key, exact)
End Function
Function GetCategoryDocsFromDb( db As NotesDatabase, viewName As String, category As String ) As NotesViewNavigator
' returns all docs from a given category
' posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/16B4DEA132579F6D862574EF00630D42
' written by Mike Mortin Dim view As NotesView ' get the view
Set view = db.GetView(viewName) ' get the docs from the cateogry
Set GetCategoryDocsFromDb = view.CreateViewNavFromCategory( category )
End Function
Function GetClusterServers(server As String, getAllServers As Boolean) As Variant
' returns a list of servers in cluster, given one server
' posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/71497FFD8E4531A7862574EF006567C5
' written by Mike Mortin 20081027
Dim s as New NotesSession
Dim cluster As String
Dim serverDoc As NotesDocument
Dim serverName As NotesName
Dim key(1 To 2) As Variant
Dim navdoc As NotesViewEntry
Dim nav As NotesViewNavigator ' define domain and name as per the default "Servers" view
Set serverName = New NotesName(server)
key(1) = serverName.Organization
key(2) = serverName.Abbreviated
Set serverDoc = GetDocFromDb(s.CurrentDatabase, "Servers", key, True) ' get a list of servers in the same cluster
cluster = serverDoc.ClusterName(0)
Set nav = GetCategoryDocsFromDb(currentDb, "Clusters", cluster) ' go through the category, add names to replica list
Set navdoc = nav.GetFirstDocument()
While Not navdoc Is Nothing
Set serverDoc = navdoc.Document
If serverDoc.ServerName(0) <> server Or getAllServers Then
Set serverName = New NotesName(serverDoc.ServerName(0))
GetClusterServers = GetClusterServers & serverName.Abbreviated & ","
End If
Set navdoc = nav.GetNextDocument(navdoc)
Wend ' tighten up the list
GetClusterServers = Split(GetClusterServers, ",")
GetClusterServers = Fulltrim(GetClusterServers)
End Function
Function GetClusterServers(server As String, getAllServers As Boolean) As Variant
' returns a list of servers in cluster, given one server
' posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/71497FFD8E4531A7862574EF006567C5
' written by Mike Mortin 20081027 Dim s As New NotesSession
Dim cluster As String
Dim serverDoc As NotesDocument
Dim serverName As NotesName
Dim key(1 To 1) As Variant
Dim navDoc As NotesViewEntry
Dim nav As NotesViewNavigator ' define domain and name as per the default "Servers" view
Set serverName = New NotesName(server)
key(1) = serverName.Canonical
Set serverDoc = GetDocFromDb(s.CurrentDatabase, "($Servers)", key, True) ' get a list of servers in the same cluster
cluster = serverDoc.ClusterName(0) If cluster = "" Then
' if there is no cluster
GetClusterServers = Iif(getAllServers, serverName.Abbreviated, Null)
Else
' grab all server documents in the cluster
Set nav = GetCategoryDocsFromDb(currentDb, "Clusters", cluster) ' go through the category, add names to replica list, skip the submitted server if requested
Set navDoc = nav.GetFirstDocument()
While Not navDoc Is Nothing
Set serverDoc = navDoc.Document
If serverDoc.ServerName(0) <> server Or getAllServers Then
Set serverName = New NotesName(serverDoc.ServerName(0))
GetClusterServers = GetClusterServers & serverName.Abbreviated & ","
End If
Set navDoc = nav.GetNextDocument(navDoc)
Wend
End If ' tighten up the list
GetClusterServers = Split(GetClusterServers, ",")
GetClusterServers = Fulltrim(GetClusterServers)
End Function
Function IIf (condition As Variant, trueCondition As Variant, falseCondition As Variant) As Variant
' such a basic function for all other programming languages ... stands for "Immediate IF"
' posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/328BED8C4AB8E446862574EF0068734A
' written by Mike Mortin
If condition Then
If Isobject(TrueCondition) Then
Set IIf = trueCondition
Else
IIf = trueCondition
End If
Else
If Isobject(TrueCondition) Then
Set IIf = falseCondition
Else
IIf = falseCondition
End If
End If
End Function
Function GetEnterpriseNAB( default As String ) As NotesDatabase
' returns the NAB from the server the current Db is on
' posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/808CDC4680D8BF37862574EF006EDD01
' written by Mike Mortin
Dim s As New NotesSession
Dim db As NotesDatabase
Dim server As String
Dim nname As NotesName ' set the default
If default = "" Then default = "Admin01/Operations/CA" ' get our parent server to get the NAB
Set db = s.CurrentDatabase
Set nname = New NotesName(db.Server)
server = nname.Common ' now, use default server if we are local
If server = "" Then server = default ' finally, grab names.nsf from that server
Set GetEnterpriseNAB = New NotesDatabase(server, "names.nsf")
End Function
Sub Initialize
' from the current view, removes a field or modifies a field in every document
' posted to http://www.openntf.org/Projects/codebin/codebin.nsf/CodeBySubCategory/A37FAED4F7480160862574F10071BAAA
' written by Mike Mortin 20081029
On Error Goto ErrorHandler
Dim s As NotesSession
Dim ws As New NotesUIWorkspace
Dim currentDb As NotesDatabase
Dim uiView As NotesUIView
Dim view As NotesView
Dim coll As notesViewEntryCollection
Dim entry As NotesViewEntry
Dim doc As NotesDocument
Dim field As String, newValue As String, msg As String, action As String
Dim items As Variant
Const kActionRemove = "remove"
Const kActionReplace = "replace"
Const kActionNone = ""
Const kMsgNoActionDone = "No changes made." ' setup
Set uiView = ws.CurrentView
Set view = uiView.View
Set coll = view.AllEntries ' get a list of all items
Set doc = coll.GetFirstEntry.Document
Forall item In coll.GetFirstEntry.Document.items
items = items & item.name & ","
End Forall ' tighten up the list
items = Split(items, ",")
items = Fulltrim(items)
items = Arrayunique(items) ' find out what action we are doing
If Msgbox("Click 'No' to replace values or to exit.", MB_YESNO, "Are you going to REMOVE a field?") = IDYES Then
action = kActionRemove
Elseif Msgbox("Click 'No' to exit.", MB_YESNO, "Then you must be REPLACING data in a field?") = IDYES Then
action = kActionReplace
Else
action = kActionNone
End If ' prompt for the item to change
If action <> kActionNone Then field = ws.Prompt(PROMPT_OKCANCELEDITCOMBO, "Please select the field you wish to " & action, "or enter a field manually.", "", items) Select Case action
Case kActionRemove
' verify the action
If Msgbox("Click 'No' to cancel.", MB_YESNO, "Are you sure you want to REMOVE " & field & " from all document in this view?") = IDYES Then
' loop through all docs in view and remove the item in question
Set entry = coll.GetFirstEntry
While Not entry Is Nothing
Set doc = entry.Document
' Call doc.RemoveItem(field)
' Call doc.Save(True,False)
Set entry = coll.GetNextEntry(entry)
Wend
msg = "Finished removing '" & field & "' from all documents at " & Time()
Else
msg = kMsgNoActionDone
End If
Case kActionReplace
If Msgbox("This might take a few minutes as each document will be examined.", MB_YESNO, "Do you want see all the current values or type one in manually?") = IDYES Then
' grab all current entries
items = ""
Set entry = coll.GetFirstEntry
While Not entry Is Nothing
Set doc = entry.Document
items = items & doc.GetItemValue(field)(0) & ","
Set entry = coll.GetNextEntry(entry)
Wend ' tighten up the list
items = Split(items, ",")
items = Fulltrim(items)
items = Arrayunique(items) ' prompt for a new value
newValue = ws.Prompt(PROMPT_OKCANCELEDITCOMBO, "Please select the value you want to use", "or enter a value manually.", "", items)
Else
' prompt for a new value
newValue = Inputbox("Please enter the new value for '" & field & "")
End If ' verify the action
If Msgbox("Currently setting '" & field & "' = '" & newValue &"'.", MB_YESNO, "Are you sure you want to set " & field & " = " & newValue & " for all documents in this view?") = IDYES Then
' Call coll.StampAll(field, newValue)
msg = "Finished stamping all documents with " & field & " = " & newValue & " at " & Time()
Else
msg = kMsgNoActionDone
End If
Case kActionNone
msg = kMsgNoActionDone
End Select ' fall through to print a message
ErrorHandler: If msg = "" Then msg = "Your action did not complete successfully. Please investigate. (" & Now() & ")" Msgbox msg
Exit Sub ' gets around "No Resume" error
End Sub
Sub Initialize
' posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeByDate/BB07663266C769D2862574F60054154B
' written by Mike Mortin, 20070830 Dim ws As New NotesUIWorkspace
Dim uiDoc As NotesUIDocument
Dim nServer As NotesName
Dim tempStr As String, fileList As String, server As String
Dim tempVar As Variant
Dim index As Integer
Const kDelim = " " ' get email content
Set uiDoc = ws.CurrentDocument
tempStr = uiDoc.FieldGetText("body") ' split and join to remove unwanted characters
tempVar = Split(tempStr, Chr(13)) ' new line characters
tempVar = Join(tempVar, kDelim)
tempVar = Split(tempVar, "'") ' single quotes
tempVar = Join(tempVar, kDelim) ' lastly, split into words
tempVar = Split(tempVar, kDelim) ' spaces ' server name is the next entry
Set nServer = New notesName(tempVar(3))
server = nServer.Common ' then parse through remaining entries to get all mailfiles listed
For index = Lbound(tempVar) To Ubound(tempVar)
Print tempVar(index)
If Instr( tempVar(index), ".nsf" ) > 0 Then
' add it to the list
tempStr = Left( tempVar(index), Instr( tempVar(index), "nsf") +2 )
fileList = fileList & tempStr & ","
End If
Next index ' now, did we find any mail files? If Len(fileList) > 0 Then
' make the list and tighen it up
tempVar = Split( fileList, "," )
tempVar = Arrayunique(tempVar)
tempVar = Fulltrim(tempVar) ' present and open the db
tempStr = ws.Prompt(4, "Select the database on " & server & " that you want to open.", "Click 'Cancel' to exit.", "", Split( fileList, "," ))
If tempStr <> "" Then Call ws.OpenDatabase(server, tempStr)
Else
Msgbox "No mailfiles detected"
End If
End Sub
Еще примеры:
Больше кодов на сайтах:

Форумы.Свежи темы и обсуждения

Я - новичок в Ubuntu... Пытаюсь проинсталить Sametime 7.5 под Linux (ну очень нужно).
...
Ситуация:
Два сервера домино 8.0.2
Первый виндусовый(партишенел, 3 сервера в одном) - СЭД
Второй линуксовый - почта

Так вот когда почта с линуксового приходит на виндусовый агенты у которых тригер "после прихода почты" не отрабатывают, не фиксируют факта приходы почты.
Документ в базу(маил-ин датабейс, не почтовая) попадает, проверено
Аналогичная ситуация когда на винде сервер выполняет и СЭД и почту всё отрабатывает.
Может это глюк, или может появилась какая-то новая настройка отвечающая за этот тригер?
С параметрами ини файла, отвечающие за время запуска агента игрался(AMGR_NEWMAILAGENTMININTERVAL=0, AMGR_NEWMAILEVENTDELAY=1)
сервера неоднократно перегружал
документы в АК пересохранял...
Добрый вечер или день!!!
У меня возник вопрос, на который я надеюсь получить ответ - Как сделать так, что-бы при инсталяции клиентской части Lotus Notes "для всех пользователей компьютера" даные пользователя (*\lotus\notes\data) ложились не в C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Lotus\Notes\Data, а в C:\Documents and Settings\%USERNAME%\Application Data\Lotus\Notes\Data ? Где находиться файл настройки в котором прописано куда закидывать даные и настройки пользователя по умолчанию?

PS: Нужно найти файл (скорее всего находиться в C:\Program Files\lotus\notes), потому что клиетнская часть устанавливаеться, и создаеться папка откуда по умолчанию будут браться шаблоны C:\Documents and Settings\All Users\Application Data\Lotus\Notes\Data\Shared\ А уже потом, при первом запуске лотуса настраиваються свойства пользователя... и создаеться папка C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Lotus\Notes\Data, а надо чтобы создавалась в C:\Documents and Settings\%USERNAME%\Application Data\Lotus\Notes\Data...

Большое спасибо за помощь!!!!
Я - новичок в Ubuntu... Пытаюсь проинсталить Sametime 7.5 под Linux (ну очень нужно).
...
В общем прохожусь по колекции профайлов
нахожу нужный
удаляю
НО
в последствии взяв профайл по имени я попадаю на удаленный со всеми итемсами .isDeleted = True
и флаг при f = Doc.Remove(True) возвращает всё время False
как же удалить профайл и не попадать на удаленный?
Здравствуйте!
Вопрос такой:
4 сервера Lotus, один домен. Нужно сделать так, чтобы 3 сервера отправляли почту во "внешку" с одного.
Foreign SMTP Domain - занимается этим. Я никак не могу найти, где его настроить или добавить. Читал, что надо делать в адресной книге, но такого названия я там не увидел.
Интересные темы:
Список форумов:

Tips. Советы

Find out how to access copied Lotus Notes documents on your clipboard with this downloadable LotusScript code. This tip is helpful when using queryPaste events to determine what content is being pasted into a Lotus Notes database.

If you use a lot of JavaScript in your applications and you haven't already then you really ought to have a play with the Domino Developer Plugin for Aptana Studio. I got started with it last week and am now wondering how I managed to get by without it.

At the moment I'm working on an Ext-based template solution for a customer and this is an absolute God-send. You get all the things you'd expect of a coding IDE -- such as auto-complete, object awareness, colour-coding and line highlighting. Will I ever be able to return to editing JavaScript in Domino Developer? Not easily!

I seem to remember taking a look at the plugin some time ago and not seeing much use in it, but I think that was probably when it was first released and before all the useful stuff was being added, such as being able to edit JavaScript Libraries.

Give it a try! Everything you need to know is on the page linked to above.

Click here to post a response

Еще советы:
Смотри советы на сайтах:

Блоги. Что обсуждают и пишут

Author: Carlos Flores
Tags: FAQ
Idea:
An out of the box template, where admins who don't code can just fill in the blanks to offer a site so the users can access and get information regarding Notes Client on how to do things, FAQ's new versions coming up and common mistakes etc.

Author: Nathan Chandler
Tags: password recovery HTTPS
Idea:

Idea Jam should have a password recovery feature - perhaps the ability to email you a new password or your old one or something like that.

Also the login page should be HTTPS.


Author: Keith Brooks
Tags: ls09
Idea:
Since there is no official blogger's lounge so to speak, what should one do if you want to meet someone?
Aside fom the Blogger BoF and the BALD dinner saturday night, if you wanted to meet or find someone, what would you prefer?
Some people don't want to be too forward, others I am sure will say just email them or call them.
Should we set up a time and place each day or after hours or something?
Or just leave it and let everyone get along best they can?
Any thoughts?

Еще записи:
Интересные блоги специалистов:

Статьи и Документация

The time set in ‘Refresh agent Cache’ is the time at which Agent Manager Daily Statistics are reported in the server log and the agent statistic counts are reset. However, if the time is set to a value other than the default of midnight the AMgr daily stats will not be reported unless the server runs continuously from midnight until the selected time.
This document details how to collect a Java dump or heapdump for Lotus Expeditor issues.
You notice a number of databases experience replication or save conflicts every time an edit is performed on a document following a Domino server data migration.
You enable the console log but one is not being created on the server. If you try to set it to enabled again, the following error occurs: "Console log is not initialized."
Notes redirect files do not get removed when a roaming user is deleted. Error: "Server Error: Folder is not empty".
Time period validity should be checked when submitting a Time/Approved Leave report.
A Lotus Notes document contains a table with one or more cells that use computed backgrounds. The formula specified for the computed background contains an error. When the document is forwarded, it causes the Notes client to crash.
The diagnostic file NSD does not capture the domdsmc stack when a crash occurs on a Unix platform (AIX, Linux, Solaris).
You may experience performance degradation with Domino SMTP servers running with Symantec AntiVirus Corporate Edition.
If you are receiving errors or connection failures during email/PIM synchronization of the Lotus® Notes® Traveler client, this document contains instructions on gathering log files and information to assist the IBM Lotus Notes Traveler support center in helping you resolve the problem.
You use an application written in Microsoft Visual Basic 6 (VB6) that works in Lotus Notes. However, after migrating to Visual Basic 9 (VB9), various Notes errors are encountered.
This article explains how to configure single sign-on (SSO) with Lightweight Third-Party Authentication (LTPA) for IBM® Lotus® Connections 2.0. Learn the basics of SSO and LTPA and the detailed steps for configuring SSO in a stand-alone environment.
In this article, learn how to use digital signature technology to prevent tampering during transmission. Follow the example provided in this article to design the form, sign the form, and verify the signature.
If you're adding some customization code and need to be able to tell if you're in full or lite mode, you can do it like this: In 8.0.x: Check the value of window.AAA. In lite mode, it should poin
On the IBM i (i5/OS), how can the ActiveX control be downloaded when using an Internet site with a custom HTML directory?
If you are new to Domino administration, here is a self-paced, e-learning tutorial to help you get started. "Introduction to Administering IBM Lotus Domino 6/6.5: Operating Fundamentals" introduces you to basic concepts that provide the foundation for Lotus Domino and Lotus Notes.
This file contains information you need for installing and running this Lotus Notes Cumulative Client Hotfix 1 (CCH1) for 8.0.2 build. It also contains information about the SPRs included in this build.
The Exploring New Features in IBM Lotus Notes 8 web seminar is a versatile seminar that quickly shows current Notes users how to use the new Notes 8 client to be more productive, highlighting changes
The Moving from Microsoft Outlook 2003 to IBM Lotus Notes 8 web seminar is a brief, versatile seminar that quickly shows current Microsoft Outlook 2003 users how to use the Lotus Notes 8 client to be
The Using IBM Lotus Notes 8: Productivity Series web seninar is a versatile set of seminar materials that quickly shows new Notes users how to use the Notes 8 client to be more productive in their job
Также почитатай:
Найти документацию можно на сайтах:

В избранное