Closing doc 1 and opening doc 2
Posted on 2007-03-20
The Scenario :
I have a "Request" document which contains a unique "RequestNo".
As users action the requests, they create "TimeEntry" documents to log their activity and time spent on the request. These time entry documents inherit the RequestNo from the Request document.
Basically, when the main request document is submitted, the user can choose to just submit the request - which is fine, it simply saves and closes.
However, they need an option to submit the request but then automatically be taken to the time entry form to log time for the request. When they do log time, they should be brought back to the main request.
The main request document has an embedded view that displays the time entries for that request.
The Problem :
I have this all working using formula to save the request document and compose the time entry document. However, as the main request document is still open behind it, when the timeentry document is submitted, the embedded view is not refreshed with the new time entry.
Having tried all sorts of refresh methods to no avail, I have decided that the best course of action is for the button that submits the request and composes the time entry document be in lotusscript, and have it close the main document and compose the time entry, then on submit of the time entry document, compose the main request document again.
Question 1 - What is the code for submitting and closing the request document and composing the time entry document with the Request field parsed
Question 2 - What's the code for submitting the Time entry document, closing it and composing the main request document
500 points as it's urgent...