In my Lotus Notes form, I have a computed-value field (it's called "NewOrdProdUID") which is set correctly with the unique ID of another Lotus Notes existing document. I'm trying to change the value of a field "NewProdAvail" in the existing document through LotusScript. Here's what I'm working with so far:
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim session As NotesSession
Dim db As NotesDatabase
Dim ws As New NotesUIWorkspace
Dim uidoc As notesUIDocument
Dim odoc As notesDocument
Set session = New NotesSession
Set db = session.CurrentDatabase
Set uidoc = ws.CurrentDocument
Set odoc = db.GetDocumentByUNID(uidoc.FieldGetText("NewOrdProdUID"))
Call odoc.FieldSetText("NewProdAvail", "0")
Call odoc.Save(True, True)
With that code, the value of the field keeps staying the same. What should I do? Please help!
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!