How do you write to the email log?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2017 04:22 PM
I am updating a record other than current in my inbound action and because of this the Target field isn't updating.
On the logs under the email where it shows what skipped/processed/etc, how can I write to this log file so when I look at the email I know what happened? The wiki shows gs.log() should write to the email logs but that doesn't appear true.
It shows up in the system logs but not the email logs. How do I get the logs to show up on the email page?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2017 07:19 PM
A workaround would be to update something on the current record like worknotes or any other field stating the email was processed or something similar.
If nothing else is possible, then you try this and it should work.
current.setForceUpdate(true);
current.update();
But this isn't a good way as we are wasting server resources for doing no real action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2024 02:04 PM
I know this is old but in case someone comes across this, there is an easy way to do this.
When creating an Inbound Email action, there is a parameter in the wrapper function preset in the script field of the Inbound Action form called logger.
You can use this logger object similar to gs.info/error/warn.
You can call it like this:
logger.info('text');
This will print your text in the log similar to what @sachin_namjoshi shows but without the need to specify the second parameter.