Related to field not populated for incoming emails from exch

Posted by stephen.vanrooyen on 03-Jan-2017 01:58

I’m using Rollbase Private Cloud v4.3.0.0, and I set up incoming emails using an exchange account.
Eg. AIGS Suport <>
Below I’m viewing an email in which I cc’d the incoming email account.
Both users in the from and the to fields exists as contact records, within this application/tenant
The related to does not seem to get populated, is this a bug? Or how is this link determined?

All Replies

Posted by Nitin Kumar Singh on 06-Jan-2017 00:36

Hi Stephen,

'Related To' is not a field which is populated from Exchange Side. It is a Rollbase internal field which links Communication Log with some specific data record. This relationship between Email and Rollbase Data Record is captured using 'Related To' field.

Documentation states:

From the Message Details page, you can:

*Select/deselect the star icon to flag/unflag the message.

*Click Communication Log to create a communication log record from this message and attach that record to a selected Rollbase record.

*Click Delete to delete the email message (move it to the Trash folder in your Gmail account).

*Return to the message list.

Complete Article is here:

Manually creating a communication Log and attaching it to one of the record from List populates 'Related To' field.

Hope this helps.


Posted by stephen.vanrooyen on 06-Jan-2017 01:30

Hi Nitin,
Thanx for the feedback.
I clicked  the Comm Log button from the Email, but still the Related to field is blank (even though the Comm Log record exists)
However, that is more or less what I was trying to achieve using either of these methods:
  • Using the Email Integration
    Is it be possible to create a trigger to programmatically create the Communication Log record and then delete the email from inbox?
  • Using the Email API, I’m able to retrieve/read Emails from this mailbox.

Is it possible to retrieve the actual email address (e.g. instead of the alias (e.g Stephen van Rooyen) for the from, to and cc fields?

Is it possible to delete an email using the Email API?

Can I create a trigger (not linked to an object) to run at a regular intervals to check the retrieve the emails from this mailbox?


Posted by Nitin Kumar Singh on 09-Jan-2017 01:08

Hi Stephen,

1. Using the Email Integration

To delete an email from Rollbase: Click on 'Delete' button to move it to the Trash folder in your Inbox account.

It is possible to create a trigger to pro-grammatically create the Communication Log record. To create the Communication Log, first create a relationship between desired objectType and CommunicationLog. Then, create trigger of type ObjectScript and use following sample code:

var hostName="";
var port=587;
var userName="";
var password="*******";
var mailProps={tls : true};
rbv_api.openPOP3(hostName, port, userName, password, mailProps);

  var msg = rbv_api.getMailMessage(20);
  var create = new Array();
  create.from2 = msg.get("from"); = msg.get("to"); = msg.get("cc");
  create.body = msg.get("body"); = msg.get("subject");

create.commType = "INCOMING"; /* R1959924 is the relationship ID b/w Communication Log and ObjDef on which trigger is defined */ create.R1959924 = {!id}; create.commParent = {!id}; rbv_api.createRecord("COMMLOG",create); rbv_api.closeMailSession();


2. Using the Email API

If the from, to and cc fields has a name displayed in your Inbox, we retrieve just the Name and save it. When there is no name attached with an email address, Rollbase saves the email. Also, we do not have any Rollbase Email API to delete email message from your inbox account?

However, could you please log both of these suggestions as Rollbase Enhancements in our Ideas Section ? Here's a link to Rollbase Ideas Section:

For your question of : Can I create a trigger (not linked to an object) to run at a regular intervals to check the retrieve the emails from this mailbox? 

Please have a look at Rollbase Batch Jobs, maybe they could help server your need. Read about Batch Jobs here :



Posted by stephen.vanrooyen on 09-Jan-2017 02:22

Hi Nitin,
Thanks once again for the feedback …
I think option 1 (Using the Email Integration) I might not have been very clear.
Here I’m using the Incoming Gmail/Exchange component.
When I select a message it has 2 buttons Communication Log and Delete.
I want automatically perform these actions on each incoming email.
(I assumed a trigger will be the best option, but not sure its possible to add triggers to the Incoming Gmail/Exchange component)
For option 2 (Using the Email API) As suggested I did log enhancement requests for  the following:
With regards to Batch Job, I did consider it at some point but none of the options seems to fit my needs.
The closest fit is Data Maintenance, but this will run for every record of a specific object. (e.g. this will run 10 times if 10 records exist)
(What I would like to do is to create an Object Script trigger to run once every 30 minutes).

Posted by on 10-Jan-2017 18:15

I also need this feature

Please let me know how y resolve the issue

Ping me at skype to have quick chat: anuragk29

This thread is closed