• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 650
  • Last Modified:

Very nasty LotusScript problem...

Hi experts,

I have a major problem and I can't figure it out how to solve it... Please help me !!!

I'm having a form with a LOCK mechanisme in it (copied and pasted it from a example) and this is working fine.
There is some LotusScript for the locking of the document in the QueryOpen, QueryModeChange and QueryClose event, that is setting a fieldvalue on the document...This code is accessing the Frontend and Backend of the document.

Now I want to add some LotusScript to the forms, in action buttons, which have to change some values on the backend class of the same document. This is working fine UNTIL the document is closed and the LOCKING mechanisme is gonna save the document, because it wants to remove a value from the lock field....

All the values I have changed in the action buttons are reseted back  to the old values. This is done by the locking mechanisme. The LOCK is using Source.Document to access the notesdocument that's behind the NotesUIDocument and I writing my code like this:

Dim uiws As New NotesUIWorkSpace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = uiws.CurrentDocument
Set doc=uidoc.Document

Hey,

I'm doing something terribly wrong here, but don't know how to do it otherwise...

Please help...

Greetings,

Bob

0
oosterbaan
Asked:
oosterbaan
1 Solution
 
AndrewJayPollackCommented:
You're probably getting the backend document earlier than when you do the updates from the front end.   Make sure to get the back end using source (or uidoc) .document  so that you get the "most current" back end document.
0
 
burmontpointCommented:
Try adding Uidoc.Reload after your actions or before all the locinkg code kicks off.

Reload Refreshes the current document with any changes that have been made to the corresponding back-end document. Refreshing the current document updates its representation in memory, and visually on the workspace, to reflect the changes that have been made to the back-end document.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now