I wanna modify an application such that after save & close a form, a second new form will be open for composing.
I prefer to use lotus script since I need to do some calculations based on the first form and then fill in some values on the second form which is then open for user input, user can either input and save the form or simply close it without saving.
I try to write a ls agent using composedocument but as it is under uiworkspace which is not suitable for web. I cannot use createdocument as well since it needs to be saved first before available for user input.
Except using @urlopen, how can I use lotus script for my case?
Subject: RE: How to composedocument on web using lotus script?
In your WebQuerySave agent build the URL string as suggested by Sudhi (although I would prefer to make it relative to the server) and then use an LS print statements to print out this path in square brackets. This will redirect your user to the new form.
dim newUrl as String
newUrl = “/” + dbFilePath + “/FormName?OpenForm”
print “[” + newUrl + “]”
You should not hard-code the file path into your agent, but retrieve it in your code. Alternatively you could use a $$Return field on your form.
Subject: RE: How to composedocument on web using lotus script?
Thanks Sudhi and Harkpabst,
I found that the original design use print “[…?OpenView]” which return to a specific view after the first form is saved.
Now I try to redirect to a second form by using print “[…?OpenForm]”. However, the codes are automatically appended to the original print “[…?OpenView]” as I discovered the url shown on IE.
I can’t modify the original module since it may be used by other function as well, I can only run the codes after calling the module, but how can I omit the original print statement and use my print statement instead?
Subject: RE: How to composedocument on web using lotus script?
No way. If there is a WebQuerySave agent that already redirects to a view, there’s nothing you can do without changing that agent’s code.
You could however extend it. You could e.g. use a submit button that first sets a flag field (like DoComposeNew) to “1” or adds this info as an URL parameter. Then the extended WebQuerySave code could check for the value of this flag field (and remove it) or for the URL parameter and invoke either one or the other print statement.