Script equivilent of @([Command]compose)

I have a button on a webpage where when clicked it should compose a document on the backend and populate two fields with data from the parent doc. EmpName and Date

My understanding is that LotusScript will not work for this.

I’ve been out of development a long time and any help will be appreciated.

Angie

Subject: Language cross-references are listed in the help file

@Command([Compose]; form)When you compose a response document, make sure a database is open and a document is already selected at the view level. See ComposeWithReference for composing response documents with references to the main document.

When the command is used to compose main documents, the target database does not have to be open. This command adds a database icon to the workspace.

If the command is used in a view action, the form formula of the view will override the form specified in the @command. To avoid this problem add the following line to the form formula of the view:

@If(@IsNewDoc; @Return(Form); “”)

For information about form formulas, see “Form Formulas” in “Programming Overview.”

The width/height parameter does not apply in MDI mode when the window is maximized. When restored, the window returns to the size you specify. The measurement in inches matches the ruler bar in the editor, so that you can use the ruler bar to guide you in sizing the window. When you specify the width and height, you center the window in the enclosing Notes window (for MDI mode) or in the operating desktop (for Mac and SDI mode).

Language cross-reference

CreateDocument method in LotusScript NotesDatabase class

createDocument method in Java Document class

Subject: Script equivilent of @([Command]compose)

@Command([Compose]) is a UI action, and therefore no good for web-facing Lotusscript (no UI code is possible). You should therefore consider the NotesDatabase.CreateDocument method.

FYI, the LS equivalent of the @Command is the NotesUIWorkspace.Compose method.

Subject: Script equivilent of @([Command]compose)

Use the button to call an agent by URL and append the values as part of the query string (Have the agent open in a new 1px X 1 PX window). The ask yourself, is the overhead associated with this worth it?

Alternatively just call an OpenForm URL with the “ParentUNID=” as part of the QueryString and let the fields do inheritance. For example:

tmpUNId:=@Text(@DocumentUniqueID);

tmpURL:="http://servername/formname?

OpenForm&parentunid=" + tmpUNID;

@URLOpen(tmpURL)

Is this something can can be done on a scheduled basis in the background or does it require the document to be open and the button be pushed for a reason? Why does it have to happen in the back-end?

Subject: Script equivilent of @([Command]compose)

You need to get use of CreateDocument or New Document(db), and then use ComputeWithForm method.