User-defined profile document problem

On a DB I want to create/update a user-defined profile document every time the user open the DB.I call this script from Database Script - Postopen:

Dim ses As New NotesSession

Dim db As NotesDatabase

Set db = ses.CurrentDatabase

Dim pdoc As NotesDocument

Set pdoc = db.GetProfileDocument(“prfUser”, ses.UserName)

pdoc.lang = “deutsch”

… other settings …

pdoc.Save False, False

I’ve designed this code with Designer 8.0 and tested it on 8.0, 7.0 and 6.5.4 and it works fine.

Then I installed this DB on a customers server and run in trouble with user-privileges. If a user with AUTHOR access opens the DB then the following error message appears:

You are not authorized to create/update documents, where you are not listed as author.

With higher privileges the error (obviously) doesn’t appear.

I’m not so familiar with Domino Server, but I think that there are some server-settings which influence this.

Can anyone tell me if this is so and/or show me a workaround for my problem?

Thanks!

Subject: Authors need a Authors-Field to update documents.

Authors need a Authors-Field to update existing documents. They can create new documents without them though.

Add an Authors field to your Profile Form, and either set it to the user’s name when creating it, or set it to a wild-card (i.e. Authors := “*” ) to allow all authors to update it.

Subject: Anonymous form

Thank you very much for your suggestion!

The reason why it worked on my system was a previously (with higher access level) created profildoc …

So all my testing obviously worked fine.

Now I do it like this:

Dim ses As New NotesSession

Dim db As NotesDatabase

Set db = ses.CurrentDatabase

Dim pdoc As NotesDocument

Set pdoc = db.GetProfileDocument(“prfUser”, ses.UserName)

Dim key(0) As String

key(0) = “[worker]”

Dim Autor As NotesItem

Set Autor = pdoc.ReplaceItemValue(“Autor”, key)

Autor.IsAuthors = True

pdoc.lang = “deutsch”

… other settings …

pdoc.Save False, False

I have tried many things and finaly posted another solution on february of this year, but under certain circumstances also this other solution didn’t work.

So I returned on the argument and at last realized the reason why my first script didn’t work correctly.

Now I decided to delete my previous posted solution and to replace it with the “right one”!