0

We have a user calendar containing certain schedule which we want to be available to all other users by default to read. Users can easily add the said calendar manually but it proves to be a bit difficult to make some of the users to understand how to do it. We're using Lotus Notes and server are both versions 9.0.1.

Is there any way to deploy this particular setting to all users so all exiting and new users would get this calendar available in their workspace by default?

1 Answer 1

0

As far as I know, there is no policy or anything similar to do that. But if you know, where the information is stored, then you can write LotusScript code to provide this calendar to the user.

The information is stored in an item called CalURLs in the CalendarProfile within the users mailfile.

Code to fill it automatically could look like this:

Dim docProfile as NotesDocument
Dim db as NotesDatabase
Dim itemUrl as NotesItem
Dim strNewEntry as String

'you get the correct entry by inspecting the CalendarProfile 
'of a user where you manually added the calendar
' or by checking http://www-01.ibm.com/support/docview.wss?uid=swg21636496
strNewEntry = "some text" 
Set db = New NotesDatabase( MailServerOfUser, MailFilePath )
Set docProfile = db.GetProfileDocument( "CalendarProfile" )
Set itemUrl = docProfile.GetFirstItem( "CalURLs" )
If isnull arraygetindex( itemUrLs.values, strNewEntry ) then
  Call itemUrl.AppendToTextList( strNewEntry )
  Call docProfile.Save( True, true, true )
end If

This code is totally untested and might contain typos. It does not contain any errorhandling.

To get the right syntax for the CalURL- Entries use this url

One problem with the calendarprofile is: it is saved all the time by many user interactions. Writing it "in the backend" without user interaction makes it very possible, that the new value will be lost.

But IF the user does it in his client (using a button or PostOpen- Script of database), then he needs to close all windows of his maildatabase before he can see the new entry.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .