When I execute the following code in a UIDocument using the background document to execute on a Local machine, the code works fine, i.e., all validation errors are surfaced and the execution of the code ends, forcing the user to fix the errors. When I attempt to execute the same code on a Domino Server the program hangs on the ComputeWithForm line and doesn’t come back. Does anyone know why this would happen?
Document.form = Fulltrim(CurrentFormString)
On Error Resume Next
ValidationError = Document.ComputeWithForm(False ,True)
If ValidationError = False Then
Call UIDocument.Refresh
End
End If
Not exactly sure what you mean by “execute the same code on a Domino server.” However, pretty much any reference to a UI element in a scheduled agent will cause it to bomb out (even something as simple as a Dim that is never used).
How are you calling the code? Can you elaborate a bit?
I’m sorry, I should have been more clear. I am executing the code via a button in a document. It’s part of my save/close logic. The user presses the button and the first thing I do is to make sure they have entered all of the proper values in fields and I do that using the background document and then using the COMPUTEWITHFORM method. I have a replicate of the database on a local PC and when the code is executed on the local it runs fine but if I open a document running on a Domino server and press the same button the logic hangs on the COMPUTEWITHFORMS method.
Were you able to make any progress on this? Now that you have explained your problem I am afraid I can offer very little. The only thing I can think of is if perhaps one of your validation formulas is trying to look something up that it cannot access from the server, or similarly if there is some kind of access restriction on the server preventing the form from completing the validation.
Otherwise it’s time to re-code the validation in script and re-use where necessary.