Hi,
I have the following code in a button for the user to select name(s) from a view. It then forwards another form which inherits values from the open document. (not all the fields, only the ones on the “forward” form.
I receive an error when the new memo is created with the forwarded document in, all the info. is there, but it gives me the error “Cannot Locate Field”. All the fields exist, I’ve even added the SendTo, Subject and Body field to the “forward” form. No luck. However, when the error appears, I just click on OK and it will send.
Another issue I’m having, once the document is forwarded into the new memo, it still displays the open “forwareded” document. How can one close that window. I’ve tried putting @Command ([FileCloseWindow]) after sending, but it doesn’t seem to know how to get a hold of that open doc. Any ideas?
@If(@IsDocBeingEdited;@Success;@Command([EditDocument]));
vNN := @PickList( [Custom] ; “Server” : “Database” ; “View” ; “Title” ; “Text”; 3 );
@Command([RefreshHideFormulas]) ;
FIELD txtMailSent := “Yes”;
FIELD kwrdStatus := “3”;
FIELD Territory := vNN;
vDisclamer := “txtMDisclaimer”;
@Command([Compose];“FwdForm”);
@Command([MailForward]) ;
@Command([EditGotoField];“SendTo”);
@Command([EditInsertText];@Implode(vNN;", "));
@Command([EditGotoField];“Subject”);
@Command([EditInsertText];“Subject Text”);
@Command([EditGotoField];“Body”);
@Command([EditInsertText];vDisclamer)
**
Thank you