Failed to fetch email viewer record error showing in the incident related list

deepikag0508
Tera Contributor

Hi Everyone,

 

I have a requirement. I have configured a custom relationship(sys_relationship) in the incident related list

 

 

deepikag0508_2-1780500844948.png

 

Name: Communications
Applies to table: Incident
Queries from table: Email

(function refineQuery(current, parent) {
    current.addQuery("target_table", parent.sys_class_name); //To get the email related incident table(incident)
    current.addQuery("instance", parent.getValue('sys_id'));//To get the related email sys_id that related current incident number.
    current.addQuery('type', 'IN', 'send-ready'); // To show the emails only in sent-ready(type) in internal communication tab

    // Add your code here, such as current.addQuery(field, value);
})(current, parent);
 
deepikag0508_3-1780500943859.png

 

On clicking the New button in the incident related list is throwing error: Failed to fetch email viewer record

 

deepikag0508_4-1780501019101.png

 

I have checked in 2 PDIs, the issue is the same. What seems to be the issue? Please help me in resolving this

 

In Native view, the same New button opens the below record

deepikag0508_0-1780501475234.png

 

Thank you in advance!

 

1 REPLY 1

Tanushree Maiti
Tera Patron

Hi @deepikag0508 ,

 

In Native View , can you add the related list and confirm whether new is working or not.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti