Help! I have the following code written in an action toolbar button:
SendTo := Manager + ", "+Approver;
Subject := “Action: Request”;
tmp := @Command([EditMakeDocLink]);
@Command( [EditDocument] );
@Command (FIELD Requested_by :=@UserName);
@Command( [FileSave] );
@PostedCommand([MailComposeMemo]);
@PostedCommand([EditInsertText]; SendTo);
@PostedCommand([EditNextField]);
@PostedCommand([EditNextField]);
@PostedCommand([EditNextField]);
@PostedCommand([EditInsertText]; Subject);
@PostedCommand([EditNextField]);
@PostedCommand([EditInsertText]; “Please approve/deny the following request by clicking on the following link and selecting ‘Approve’ or ‘Deny’ once the document is open–>”);
@PostedCommand([EditPaste])
This seems to work perfectly for me, i.e., the e-mail composes, the other file closes and the Requested_By Field is populated appropriately. However, when other users use this button, their e-mail has all the code in the ‘SendTo’ field and they are also prompted to save the original document. What am I doing wrong?
Thanks. Unfortunately, I don’t want to use @MailSend because I want the author to be able to add notes to the e-mail they are sending.
I did try setting the field Requested_by and then saving the file, but when I look at the document properties, I don’t see the Requested_By field as being populated by the UserName. I wanted to use the contents of this field in a response action.
It seems as if the user that had everything appearing in the ‘SendTo’ field is an anomaly, i.e., all other users are seeing the same thing as me.