Opening documents to wrong users

Hi

when user click on find button user’s profile page shoul be open. In normal conditions it is working properly. But if 2 or more users try to open their profiles at same instance of time, they are getting other’s profiles. Means only one profile is opening to all the users.

I am not understand why this is happening.

Following is the code in agent::–

key=profiledoc1.Profilekey

dbpath = getdbpath



Set authorView = db.getview("LookupPersonalProfiles")



Call authorView.refresh

dbug.logaction("Key= " + key(0))

Set authorDoc = authorView.getdocumentbykey(key(0), True) 



If  authorDoc Is Nothing Then

	Print "[/"+dbpath+"/"+"PersonalProfile?OpenForm]"

Else

	getUNID = authorDoc.universalid

	dbug.logaction("UNID=" + getUNID)

	Print "[/"+dbpath+"/($All)/"+Lcase(getUNID)+"?EditDocument]"

End If



dbProfile.clientType = ""

dbProfile.ProfileKey =  ""

authorView.AutoUpdate=True

Call authorView.refresh

Can any one help me.

Subject: Opening documents to wrong users

Hi Pradeep

I can’t see how you’re setting up your profiledoc1, so I’m not sure whether it is working ok or not. It seems that the value of ‘key’ remains the same between all the users and therefore they all end up seeing the same profile document.

I have 2 points:

1- You should search for “profile document” in this forum. You’ll find that this has been a long running issuse with Domino. Profile documents are cached in memory and not saved to disk immediately after a save!

Some users have reported that it can take as long as half an hour for the profile document to get committed to disk. Therefore before that happens anyone opening the profile doc ends up seeing the old version on disk and not the one in memory.

The above is not quite your problem I don’t think but I can’t be sure and that’s why you need to check how you set up your profiledoc1, as I mentioned earlier.

But you must be aware of the profile document issue for all your applications anyway. When documents need to change regaularly, use normal Notes docs and not the native profile docs.

2- You can test and see if the key changes between the users or not.

Firstly check the key value in your logs. Is it the same between different users? It probably is.

Next hard code the key value, eg use 3 key values that you know exist. Each time there is a click on your button, the code should use the next value in the list of 3 keys.

If each time a different profile document is displayed in this test, then you know the problem is that your key value is not changing between the different users.

Then the problem is either that the key value is cached in memory (not likely I don’t think) or that the same profiledocs1 is cached or profiledocs1 doesn’t change for some other reason.

Once you know exactly where the problem is, you can then find a work around.

If you are using actual Notes native profile docs I suggest you replace them with normal docs as they always cause problems anyway.

Good luck

B

http://www.Internet-Marketing-Wizards.com