Inbound action on sysauto_report (Scheduled Email of Reports) table

sitarani
Kilo Explorer

Hi there,

We have a requirement: when user replies to scheduled report email (sysauto_report) table, a record should get inserted for a custom table.

I have created inbound action

on table: sysauto_report

type: Reply

script: a glide query to insert the record for required custom table.

This inbound action never gets executed with one of the email logs as below.

Skipping 'Create IRT - Reply to scheduled report ', did not create or update sysauto_report

Could you please suggest if am missing anything or with alternate way to achieve this .

Thanks in advance,

Sitarani

5 REPLIES 5

Jaspal Singh
Mega Patron
Mega Patron

Hi Sitarani,



Could you kindly help with the inbound code.


Thanks Jaspal, for your response. Below is the code in inbound action



gs.info("IRT>>>>>>>>>>>>>>>>> inside inbound action.");


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


gs.info("IRT>>>>>>>>>>>>>>>>> reply mail to scheduled report.");


var gr = new GlideRecord('x_wmll3_investor_r_routing'); //scoped application table


if (gr.get("email", email.to))


{


gs.info("IRT>>>>>>>>>>>>>>>>> reply mail to scheduled report.");


//create new IRT


var newirt= new GlideRecord('x_wmll3_investor_r_irt');


newirt.opened_by=email.from;


newirt.duplicate='true'; //flag when IRT gets created from a closed one


newirt.work_notes="This IRT has been created from the reply mail to - "+current.name +" report." ;


newirt.insert();


event.state="stop_processing";


}


}


Hi Sitarani,



Try using below



gs.info("IRT>>>>>>>>>>>>>>>>> inside inbound action.");


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


gs.info("IRT>>>>>>>>>>>>>>>>> reply mail to scheduled report.");


var gr = new GlideRecord('x_wmll3_investor_r_routing'); //scoped application table


//if (gr.get("email", email.to))


//{


gs.info("IRT>>>>>>>>>>>>>>>>> reply mail to scheduled report.");


//create new IRT


var newirt= new GlideRecord('x_wmll3_investor_r_irt');


newirt.opened_by=email.from;


newirt.duplicate='true'; //flag when IRT gets created from a closed one


newirt.work_notes="This IRT has been created from the reply mail to - "+current.name +" report." ;


newirt.insert();


event.state="stop_processing";


//}


}


Hi Jaspal,



tries as suggested , but no luck.