Solved

Document Locking Problem

Posted on 2006-11-10
34
488 Views
Last Modified: 2013-12-18
I have a Workflow database that is not behaving correctly.

I have one associate that reviews calls that have been logged in the database and decides if a Service Inquiry needs to be created or not. If she does create a Service Inquiry (SI), she clicks a button on the call form, that says Create Service Inquiry. A SI Form comes up and inherits the call information and also as a area for her to assign an associate to the SI. She then clicks, Send email to Assigned on the SI Form, that sends a email with a document link to the associates, saves and closes the SI Form. Then back at the original call, she clicks Save and Close on the form.

Then the associate assigned, goes to their email, opens the document link and clicks on Edit Document, but when they do this, they get a message saying "This document is locked by User/Company".  The person that created the SI is no longer in the document and I have no clue why this is still locking the document.

I have tried the following solutions:

***Made sure the Document Locking was not selected on the Database properties

***Added EDIT_NO_SOFT_LOCKS=1 to the ini file on the assigners PC

***Added in the  QueryClose event on the Service Inquiry Form

If Not( Source.IsNewDoc ) And Source.EditMode = True Then
Source.EditMode = False
End If

***Uninstalled and Reinstalled their notes, no change

***Actually had the assigner log onto a different PC and try, no change

I am really at a loss on why this is happening and only to a select few people in the database. Any help would be great.

This is all done on ND7 (Release 7.0.1).

Thanks!!!
0
Comment
Question by:kali958
  • 16
  • 6
  • 5
  • +2
34 Comments
 
LVL 63

Expert Comment

by:SysExpert
Comment Utility
I would try R 7.02 and see if this has been resolved.

I hope this helps !


0
 

Author Comment

by:kali958
Comment Utility
I do not have that available as a solution. My company makes the decision what version we are on and I have no say in that.
0
 
LVL 63

Expert Comment

by:SysExpert
Comment Utility
This is espeically true since it is internittent, and happening randomly.

At a minimum R 701 with FP1 on the server and R702  on the client.

I hope this helps !
0
 

Author Comment

by:kali958
Comment Utility
SysExpert

It is not happening randomly, it is happening to specific associates. I can not do anything to change the version of ND on the client or the Server, so I am not clear on how your solution would help?

0
 
LVL 63

Expert Comment

by:SysExpert
Comment Utility
If it is only happeninf to specifi people then.

1) Check for any commonalities.
a) Version of client
b) ACL
c) anything else that could be relevant. ( notes.ini )

Check the IBM LDD for known issues that may have been resolved in newer versions.

see

http://www-10.lotus.com/ldd/r5fixlist.nsf/search?SearchView&Query=lock%20AND%20(FIELD%20MaintVerNum%20CONTAINS%20(7.0.2%20OR%207.0.1%20FP1%20OR%207.0.1))&SearchOrder=1&SearchMax=0&SearchWV=FALSE&SearchFuzzy=FALSE&Start=1&Count=10



0
 

Author Comment

by:kali958
Comment Utility

1) Check for any commonalities. - ***This has been checked already
a) Version of client - ***all on the same version, due to that is a company standard.
b) ACL - *** all are editors without delete in the database
c) anything else that could be relevant. ( notes.ini ) - ***notes.ini has been checked and also the notes software has been uninstall and reinstalled on each pc.

Problem still exists. The link above also did not provide any help.

I am really trying to find a solution to the issue or if someone else has run into this. The suggestions you are providing either can not be done (such as version update, due to I have no control over that) or I have already tried security changes, code changes, and so forth.
0
 
LVL 3

Expert Comment

by:Joep8020
Comment Utility
Do you use LotusScript to put the doc in edit mode? If so that is your problem. Somehow on some versions putting a document in edit mode using script locks the document, but does not tell the unlocker task the document has been locked.

Solution: use Formula language or automatically enable edit mode, or open in read mode.
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
Hmm.. checking release notes, and the bug referenced by joep8020 is documented for 6.5 and corrected:  http://www-1.ibm.com/support/docview.wss?rs=0&q1=document+locking&uid=swg21237490&loc=en_US&cs=utf-8&cc=us&lang=en

I'm wondering if the click on link opens the document in edit mode, and the subsequent click on the edit button causes the locking feature to display an incorrect message.  See: http://www-1.ibm.com/support/docview.wss?rs=0&q1=document+locking&uid=swg21175299&loc=en_US&cs=utf-8&cc=us&lang=en

Question: when the user clicks the link, is the document ALREADY in edit mode?  The combination of your ini parameter, and clicking on the edit button might be causing the error message.

Next question: what are the edit rights for the document and those specific users.  If they have author access, and they didn't create the original document and there are no author fields on the document, then that might be the real problem and the error message is a red herring.   Check the ACL for those users, and check the document properties: who can edit these documents.

Are the clients (as sysExpert suggests) running a different version than the server?
0
 
LVL 8

Expert Comment

by:behenderson
Comment Utility
Are you SAVING the document before you create the doclink.  The Document UniqueID Changes upon save so make sure the document is saved and then the link to it is created.
0
 

Author Comment

by:kali958
Comment Utility
Joep8020, this is all formula lang. used to put the doc in edit mode and saving it

Behenderson - Yes, I am saving the doc before the email is being sent.

Marilyng - Thanks for taking the time to look at my question!  The user creates the SI and then they click a Send Email to Assigned Associate. So, the doc is in edit mode while they are filling it out but I put in formula lang. to save the doc, then send the email
All users have Editor access w/o delete.  
Also, Client and Server not different versions.

I also tried the following solution from the IBM KB

1. Set the database properties to allow document locking.

2. In the PostOpen event (for documents opening by default in Edit Mode) or the PostModeChange Event (for documents to be manually be put into Edit mode), put the following code:

Sub Postopen(Source As Notesuidocument)
Dim doc As NotesDocument
Set doc=source.document
Call doc.RemoveItem( "$Writers" )
Call doc.RemoveItem( "$WritersDate" )
Call doc.Save( True, True )
End sub

This did work in the template but not the NSF.

0
 
LVL 3

Expert Comment

by:Joep8020
Comment Utility
- Does it help when the locking user (the creater of the SI) - opens, edits and saves/closes the SI?
- how do you close the SI
- how do you create the SI, just @Command([Compose])?

There could also be a timing problem, between the save and the mail send, to test this try:

@If(@Command([FileSave];@MailSend(.....);"")
0
 

Author Comment

by:kali958
Comment Utility
Joep8020:

- Does it help when the locking user (the creater of the SI) - opens, edits and saves/closes the SI?
YES - this is our workaround right now. The SI Creator sends the email, which then saves the form and closes it, goes into the Work Item view, opens the doc, clicks on Edit Document and then clicks on Save and Close

- how do you close the SI
It automatically closes after you click the Send to Assigned button

- how do you create the SI, just @Command([Compose])?
It can be created in two places, either on the Call Form (there is a button there that says Create SI and all it has is a @command(compose;si) or you can go to the button on the home page that says Create SI (again, just a @Command(compose)).

Here is the actual code I have on the SEND EMAIL TO ASSIGNED BUTTON
@MailSend(S_Assigned ; "" ; "" ;"SERVICE INQUIRY - Date Due: "+@Text(S_DateDue);@NewLine+@NewLine+"Email Comments: "+Comments+@NewLine+@NewLine; "";[IncludeDoclink]);
@Command([FileSave]);
@Command([EditDocument];"0");
@PostedCommand([FileCloseWindow]);

I will give your @If(@Command[FileSave].....
0
 
LVL 3

Assisted Solution

by:Joep8020
Joep8020 earned 150 total points
Comment Utility
don't put the document back in read mode.... just use the if statement with a @DO..

so use:

@If(@Command([FileSave]);
@Do(
@MailSend(S_Assigned ; "" ; "" ;"SERVICE INQUIRY - Date Due: "+@Text(S_DateDue);@NewLine+@NewLine+"Email Comments: "+Comments+@NewLine+@NewLine; "";[IncludeDoclink]);
@Command([FileCloseWindow])
);
"")
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
Agreed, as joep8020 says, the mail is being sent regardless of the save state of the document.  That means if validations click in, or the user cancels the document, the mail is sent.

Try the adjusted code posted by joep8020 and see if that makes a difference.

The only thing I would add, but only if the above works and then you get all sorts of "do you want to save this document" messages.

Is to incorporate the SaveOptions field on the forms.   But this would require a bit more logic and testing for you.  See if the above works first.  If, you become annoyed with the Do you want to Save?  (which should happen when you call the FileCloseWindow)

Or you get repeated "Do you want to save" messages, then you would need to add the SaveOptions Logic.

Basically, SaveOptions is a text field that you can add to a form, or just add to an action.  SaveOptions="0" means the document will not save, no matter if the user presses CTRL + S or clicks a button.  This is helpful when you have dialog boxes, or forms that you want to force users to click a button, or if you have querySave logic in the form events.  (Action buttons process ALL their logic before the query save event kicks in).

Setting the SaveOptions to "0" as the form is opened in edit mode allows the user to ESC without the message, "Do You Want to Save" and bypasses the CTRL + S keys.   When you really want the user to save, you set the SaveOptions:= "1".

Caveat, once the field SaveOptions is on a document, you must manage it.

0
 

Author Comment

by:kali958
Comment Utility
Tried the @Do and the document still stays locked :(
0
 
LVL 3

Expert Comment

by:Joep8020
Comment Utility
and if your try this:

@Command([EditDocument];"1");
@If(@Command([FileSave]);
@Do(
@MailSend(S_Assigned ; "" ; "" ;"SERVICE INQUIRY - Date Due: "+@Text(S_DateDue);@NewLine+@NewLine+"Email Comments: "+Comments+@NewLine+@NewLine; "";[IncludeDoclink]);
@Command([FileCloseWindow])
);
"")

(just trying as I would when debugging a problem...)
0
 

Author Comment

by:kali958
Comment Utility
I tried both codes that Joe posted. Even made two new buttons to test. When the person assigned gets the email, the open the document link, the doc is in read mode and when they click the Edit Document button they still get the "This document is locked by So and So".

I alos tried both codes w/o the doc link, thinking maybe that might make a difference and it does not.

0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 8

Accepted Solution

by:
behenderson earned 200 total points
Comment Utility
Another possibility is the default view in the database.  Does the database have a default view specified.(If it does see if changing it makes any difference)  When a doclink is created the default view in the database is part of the link, I have had problems in the past that were created by problems with the default view.

I know that whether or not you saved the document and whether you have a default view does not seem to be related to a document locking problem but I think the problem is with the structure of the link, and a misleading error message.

Good luck.
0
 

Author Comment

by:kali958
Comment Utility
There is a default view, I will try changing it
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
good point bdhenderson... that default view needs to be accessible to all, and contain the document listed in the link.
0
 

Author Comment

by:kali958
Comment Utility
Does it matter the volumn of documents in the view?
0
 

Author Comment

by:kali958
Comment Utility
On note, on the code that Joe did:


@Command([EditDocument];"1");
@If(@Command([FileSave]);
@Do(
@MailSend(S_Assigned ; "" ; "" ;"SERVICE INQUIRY - Date Due: "+@Text(S_DateDue);@NewLine+@NewLine+"Email Comments: "+Comments+@NewLine+@NewLine; "";[IncludeDoclink]);
@Command([FileCloseWindow])
);
"")

This is actually closing the whole database and not just the form - is there a way to change that?
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
kali958,
If the command is issued from a view, or a form with no other database elements open, then the @Command([FileCloseWindow]) will close the database.
0
 

Author Comment

by:kali958
Comment Utility
It was issued from the form, but the database is open behind it and it closes both.
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
Hmm... then there is either another FileCloseWindow hiding, or another close statement in the query close event.  Try removing the FileCloseWindow in your action button and replace it with: @Prompt([OK];"Close";"Here is where the close goes.")

Then see if the form closes after you press the action button.  If it does, then there is another close statement somewhere.
0
 

Author Comment

by:kali958
Comment Utility
This is the code that I have on the button

@Command([EditDocument];"1");
      @Do(
            FIELD Status_1 :="Saved";
            FIELD Person := Person: @Name([CN];@UserName);
            FIELD Action := Action: @If(S_DateComplete="";"SI Saved";"SI Saved & "+Status);
            FIELD ActionDate := ActionDate:@Now;
            FIELD Current_Status:=@If(S_DateComplete="";"SI Saved";"SI Saved & "+Status);
            FIELD Time_Ends:=@Now;
            @Command([FileSave]);
            @Command([FileCloseWindow]))
0
 
LVL 8

Expert Comment

by:behenderson
Comment Utility
Kali..  What?? I do not see the mailsend stuff  Please give us the FULL contents of the button that is not working....   There could be some problem with the order of operations.. If you remove all the Close documents does it send the mail with a good doclink?  Does everyone have the problem that says the document is locked or just a subset of people? If you are in the document and you select (from the menu at the top) EDIT   COPY AS LINK     DOCUMENT LINK and then you create a memo paste the link into the memo and mail it to these people does THAT open the document without an error?  

Below is a list of what is included in a doclink

<REPLICA 86256DAD:0068B6EC>
<VIEW OF5E502A1B:AAAF40CA-ON85256197:006C1A32>
<NOTE OF3C655360:1CDA8251-ON05257228:00520D24>
<HINT>CN=XXXXXXXXXXXXXXXXX</HINT>  

The Replica part refers to the Replica ID of the database so if there are replicas of the database beyond the one you are in and they have that replica on their desktop that can be problematic
The view part refers to the View that the link was created from (or if it was created from inside an open document the default view.) The view that is referenced in the doclink must be accessible to the people trying to use the link or that can create problems
The Note part refers to the NoteID of the document and if you create the link from a document that has not been saved the NoteID changes upon save and that link is no good OR if you try to create a link to a document but the document has been closed or something that will create an invalid reference or their could be some other reason that the NoteID reference is invalid.

So their is either a problem with the Link or there is a problem with the users ability to access the database and document.

Sending them a manually created doclink and establishing whether or not they can open it will let you know if the problem is in the users ability to access the database and document.

Giving us the EXACT code in the button etc.  Will help us to determine if you are doing something that is going to create a 'Bad Link'  or a link with references in it that are invalid.  
0
 

Author Comment

by:kali958
Comment Utility
sorry about that, that was the save and close button

code:

@Command([EditDocument];"1");
@If(!@Command([ViewRefreshFields]);@Return("");"");
FIELD Status_1 :="Assigned";
FIELD Person := Person: @Name([CN];@UserName);
FIELD Action := Action: "Email Sent";
FIELD ActionDate := ActionDate:@Now;
FIELD SI_FinalStatus :="Forwarded";
FIELD Current_Status :="Assigned to "+S_Assigned;
FIELD Date_EmailSent :=@Today;
T:=@Prompt([OkCancelEdit]; "Comments"; "Type your Email comments below.";"");
FIELD Comments :=T;
@Command([ViewRefreshFields]);

@If(@Command([FileSave]);
@Do(
@MailSend(S_Assigned ; "" ; "" ;"SERVICE INQUIRY - Date Due: "+@Text(S_DateDue);@NewLine+@NewLine+"Email Comments: "+Comments+@NewLine+@NewLine; "";[IncludeDoclink]);
@Command([FileCloseWindow])
);
"");
@Command([FileCloseWindow]);
@Prompt([Ok];"Assigned Request";"SI has been assigned to "+S_Assigned)


Although, I have changed the default view to a smaller view and out of the 10 people thate could not edit the document now I am down to two associates that when they gen a form, it is locked by them. One associate has commented that they have other issues with their PC so they are getting a new one tomorrow, I am almost wondering if that is not impacting this issue. The other associate, she is out of the office today but will be back tomorrow morning. I will know tomorrow if any adjustments to the code and view will work for them.
0
 
LVL 8

Expert Comment

by:behenderson
Comment Utility
I would try sending them a manual link to see if they can get to the database with the manual link... If they cannot then they either do not have access to the default view OR they do not have the correct replica of the databas on their workspace.. perhaps a local replica or something.

If they can.. (ANd I don' t think this is the case) then there is something further that we need to look at..   Sometimes people have problems with:
A  The wrong replica on their workspace
B  Insufficient access to the database
C  A screwed up Notes Desktop which can often be fixed by deleting the desktop.dsk, desktop.ndk and cache.NDk files and re-adding ALL of their icons (Pain)

I think that the problem may have been largely resolved by changing the default view
0
 

Author Comment

by:kali958
Comment Utility
I agree, I think that the default view is playing a part, but I also think on these two computers, it might be a replica issue and also I think I do need to blow away the desktop. dsk, ndk, and the cache. I will know tomorrow morning if this helps. Thanks!
0
 
LVL 18

Assisted Solution

by:marilyng
marilyng earned 150 total points
Comment Utility
Uh, you have TWO  fileclose  statements.

One nested in the @if, and another outside it.  That's why the database closes.

@Command([FileCloseWindow])
);
"");
@Command([FileCloseWindow]);

Take out the second one.
0
 

Author Comment

by:kali958
Comment Utility
I think between the combination of changing the default view, changing the code, and then removing the the extra File Close Window, the data is fixed. I have had the testers get back to me this morning and so far, no document locking!

I dont know if I could say which one was the better solution due to, I think that all three were needed (view, code change, and remove duplicate code). So I am not sure how to do the points - can I split them three ways?
0
 
LVL 8

Expert Comment

by:behenderson
Comment Utility
Yes,

I hope this is an easy to follow explanation of how.
From Help:
 Scroll down to the bottom of the question and click the "Split Points" link at the bottom of the page. Select the radio button of the comment who you want to Accept as the answer. Only one button can be selected. Set the point value (a text box above the comment) of how much you want this person to receive of the points. Then set the point values for each of the experts comments to whom you want to allocate points and these will be considered Assisted answers in helping you resolve the issue. Double check your information and then click the Submit button at the bottom of the page. One note: the total points of the splits must equal the amount you asked the question for itself, and no person can receive fewer than 20 points.
0
 

Author Comment

by:kali958
Comment Utility
Thanks ALL - it is up and running today and working great!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now