LS: UI editdocument - how to make LS wait for result

Hi all.

I am working on a script for automated processing of mails in the users mailbox. While processing them, LS is creating new person documents in an additional directory. The new person doc is ment to be edited/completed by the user, runnig the script and after completing the form I need some of the field contents to properly carry on with my script.

LS opens the new doc in the uiworkspace to enable the user to edit the document which is fine - but the script carries on regardless. I do understand why - it is a UI session and UI sessions work independently from LS. But I would like LS to wait, unitl the UI document is saved and closed by the user.

Any suggestions? Or can I take a different way to proceed like this?

Any help welcome…

Subject: LS: UI editdocument - how to make LS wait for result

That’s what dialog boxes are for.

Subject: RE: LS: UI editdocument - how to make LS wait for result

Unfortunately Dialog boxes don’t work in this case because the form name “Person” is included in the local mail file and in the “other” diretory. The first parameter of the dialogbox function is the form name and there is no way, that I can deferr to the form named “Person” in the remote directoy.

Subject: RE: LS: UI editdocument - how to make LS wait for result

A document creared in a dialog box doesn’t “inherit” the form used in the dialog, so you can use a form with any name.

Subject: RE: LS: UI editdocument - how to make LS wait for result

Thanks to both of you. I will try and get back with the results.

(And yes - I did try it, not just guess… :-))

Subject: RE: LS: UI editdocument - how to make LS wait for result

Did you actually try it or are you just assuming it won’t work?

The form name is taken from the database that contains the document you’re opening in the dialog. If you create a new document in memory, and open it in a dialog, it will use the form in the database you created it in – not necessarily the “current” database.

Moreover, there’s no reason you have to save the document into the same database you created it in, nor does the form name have to be the same you’re going to save it with. Create a custom form – that’s probably better for use in a dialog anyway. If it’s not in the right database, create a new document in the right database and copyallitems to it.