The CreatorCon Call for Content is officially open! Get started here.

Inbound Email Action not working

amacqueen
Mega Guru

In a new application I have created I have enabled email sending and am showing sent/received email in activities however whilst I can see outbound email I cannot see inbound so I checked 'System Mailboxes - Received' and saw it wasn't being processed. My inbound action on the correct table is as below:-

gs.include('validators');

if (current.getTableName() == "u_wmi_change_europe") {

  current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;

  if (email.body.priority != undefined && isNumeric(email.body.priority))

  current.priority = email.body.priority;

  }

  current.update();

}

find_real_file.png

Above is the inbound action

TIA

17 REPLIES 17

Have you checked the below to see what happened?



1. Error string of the ignored email (click on the ignored record in Received mailbox)


2. System logs to see whether it processed or skipped the inbound action, and what the information is


Hi Chuck,

Hope you are doing well !!

I have landed in a similar situation while working with ATF. Half of the part which I want to achieve works.

My inbound email action will 'close complete' an catalog task generated from an RITM and also it should change group name in the group table. The inbound email is able to close the sc_task but it is unable to change the group name.

find_real_file.png

The HPSM group name should get changed(but it does not) when the instance receives the inbound email which the instance receives and closes the catalog task.

The body of the inbound email looks like:

The HPSM group name has been changed.
 
Old HPSM group names: E-CUSTINCSSP-AD-BUILD-IAM-TX_36
 
New HPSM group names: E-CUSTINCSSP-AD-BUILD-IAM-TX_37
 
The code which processes this one:
 
var val = email.body.old_hpsm_group_names.split(' | ');
var new_val = email.body.new_hpsm_group_names.split(' | ');
for(var i=0;i<val.length;i++){


var group = new GlideRecord('sys_user_group');
group.addQuery('u_hp_dw_name',val[i]); //checking HPSM group name
group.query();
if(group.next()){
gs.log(group.name,'<<Group Name>>');
group.u_hp_dw_name = new_val[i];   //updating HPSM group name
gs.log(group.u_hp_dw_name,'<<New HPSM Name>>');
group.update();

}

//group.update();


//gs.log(val[i],'<<EC_1>>');
//gs.log(new_val[i],'<<EC_2>>');
}
 
When I test manually everything is perfect as per my requirement.
 
ATF steps screen shot:
 
find_real_file.png
 
ATF result screenshot:
find_real_file.png
One of the reason which I find is the body of the inbound email is blank in ATF test step but subject is fine. But when I check the actual email log while running the ATF, the body is there.
 
Request for your advice please.

Michael Fry1
Kilo Patron

When you created the new table, under Application Access did you check Can create, Can Update, and maybe Can delete?


I've been caught by this on a scoped app before!


Same!