Inbound email processing but target is empty

e_wilber
Tera Guru

I have created a new non-extended custom table and have an inbound action. The inbound action is supposed to create a new record (which it does).

The issue is the target on the email record is broken. It's not empty but when you click on it you can't see the created record (it shows preview not available).

 

My IA is pretty basic:

var bodyId = email.body.id;
current.u_number = "PID" + bodyId.trim();
current.u_primary = email.body_text.split('\n')[0];

current.insert();

 

On the new record I am creating, the activity log does not show an email was ever received (which is what my real goal is) which I suspect is because the email record doesn't link to the new record even though it was created.

Is this a bug?

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Hi,

Can you navigate to your email list and check the log for this particular email to see what all happened?

sys_email.list in your left-hand navigator and press enter, find inbound email, then scroll to bottom for the log and see if it was classified as new and what all happened with it.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi Allen,

The logs show that the email was considered new and it created a new u_programs record and even calls out which one was created.

find_real_file.png

 

This is the email record's target though:

find_real_file.png

Hmm...

You could try adding this to your script:

sys_email.target_table = 'table_name';

More information here: https://hi.service-now.com/kb_view.do?sysparm_article=KB0535511

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!