Link to home
Start Free TrialLog in
Avatar of oosterbaan
oosterbaan

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of AndrewJayPollack
AndrewJayPollack

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of burmontpoint
burmontpoint

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.