tag:blogger.com,1999:blog-930701489422940227.post6845409761551381040..comments2024-03-08T04:36:34.741-05:00Comments on Technical Tips & Tricks: Alfresco Notification Rules - Alerting Users of New File UploadsAnonymoushttp://www.blogger.com/profile/12082457929047237520noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-930701489422940227.post-20371368178233202032017-07-13T04:55:12.239-04:002017-07-13T04:55:12.239-04:00That's a good question.
It doesn't look li...That's a good question.<br />It doesn't look like it is possible to select the current user with the GUI available from the "send menu" picker.<br />An alternative is to instead of using "send email", to select "execute script".<br /><br />Create a script in the Data Dictionary > Scripts folder.<br />Make sure you set the mimetype for the script to Javascript (via Edit Properties) and also set a title for the script.<br /><br />The contents of the script can be as follows.<br />Note that the person object should correspond to the current user.<br /><br />var mail = actions.create("mail"); <br />mail.parameters.to = person.properties["email"]; <br />mail.parameters.subject = "Hello from JavaScript"; <br />mail.parameters.from = person.properties["email"]; <br />mail.parameters.template = companyhome.childByNamePath<br />("Data Dictionary/Email Templates/notify_user_email.ftl"); <br />mail.parameters.text = "some text, in case template is not found"; <br />mail.execute(document);Dick Weisingerhttps://www.blogger.com/profile/11465621138093053250noreply@blogger.comtag:blogger.com,1999:blog-930701489422940227.post-89740978549721558842016-10-25T01:19:05.066-04:002016-10-25T01:19:05.066-04:00goodgoodAnonymousnoreply@blogger.com