Closing A Uidoc From An Agent

115 pts.
Tags:
Agents
Lotus Notes 6.5.3
Lotus Notes Automation
Lotus Script Agent
LotusScript
I have a database for supervisor shift reports. The shift report must be locked after the shift has ended so no further editing can take place. I have written an agent in LotusScript that handles that requirement. The problem I am having is that sometimes the supervisor forgets to close the shift report at the end of the shift. He just walks away and goes home. I found a property in the NotesDocument class that will tell me if the uidoc is open, doc.IsUIDocOpen, but I don’t know how to access the open report and close it from the agent. Any suggestions? Thanks for your help.



Software/Hardware used:
Lotus Notes 6.5.3

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Stiletto
    I don't think that property will help you. I think it only checks if the uidoc is open in your session, not anybody's session.
    3,830 pointsBadges:
    report
  • Mglist
    Thanks for your response, but I need to know how to close an open document from a scheduled agent.
    115 pointsBadges:
    report
  • Stiletto
    You can unlock the document, but you can't close the window/tab on the remote client.
    3,830 pointsBadges:
    report
  • SlikTool
    Yeah, you can't close that from your workspace, plus the IsUIDocOpen is only at the machine you are using, not another machine. I assume this is open in the Notes Client, so, I wonder if it would be possible to set a timer on the document, and if nothing has been done (save or refresh) for say 1 hour, then the UIDoc closes and saves as it is. Would have to research, unless someone else out there knows this can/can't be done. What OS are the user's on? Mike K
    1,840 pointsBadges:
    report
  • Mglist
    Some additional information. Yes, the user will be in a Notes Client, 6.5.3, running Windows XP. I have an agent running on the Notes server that knows when shifts end and sets a hidden field in the backend document so no further editing is allowed. The PostModeChange event checks the value in this field to see whether editing is allowed. If not, it displays an error message that futher editing is not allowed, closes the uidoc, and exits. This makes sure that all can read the report, but no one can edit it after the shift expires. Some supervisors open, edit, and close the report as the shift progesses, but sometimes the report is open for edit, the supervisor get called away for problems on the floor and forgets to go back and save/close it before going home. I was asked if my agent could check to see if the report is open when setting the expiration field, and if so, close it. I haven't been able to find any information on how to do this. That is why I am asking the experts for their advice. Thanks for all your help.
    115 pointsBadges:
    report
  • Stiletto
    Think of it this way: communication between the client and the server is initiated by the client. So, an agent running on the server has no means of starting the conversation with the client. Could you write an agent that runs on the client (perhaps scheduled to run at the end of the shift, but before your agent) to close things down?
    3,830 pointsBadges:
    report
  • Ledlincoln
    How about modifying the design so that the actual data remains in the back end; the document that the supervisor opens is simply for data entry/viewing, and doesn't touch the back end until he clicks a "Save and Close" button, at which point it writes to the back-end document(s)?
    1,620 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following