How to set all emails in my System Logs > Emails to send-ignored?

Himanshu Patel
Tera Contributor

I need to mark all emails in my test instance to send-ignored. Is there a way I can do it via bulk update? I have about 58000 emails as such.

1 ACCEPTED SOLUTION

Mohith Devatte
Tera Sage
Tera Sage

Hello,

You can do it in a back ground script or you can create a fix script for this .

To navigate to fix script follow below steps

1) Go to main page and in left navigation type in "Fix scripts"

2) Click on new 

3)Paste the below script  and save it 

4)  On the top right corner you can find  a button called  run fix script

5)Click on it and check the status of the email logs

Script:

var gr = new GlideRecord('sys_email');

gr.query();

while(gr.next())

{

gr.type="send-ignored";

gr.update()

}

Please accept the solution if you got any help from this script

View solution in original post

5 REPLIES 5

Palak Gupta
Tera Guru
Tera Guru

Hi there!

Did you tried doing that using "Update all" option from List view.

Regards,

Palak

HI Palak, List view have a limitation on number of records to be updated. The fix script from Mohith helped.

Mohith Devatte
Tera Sage
Tera Sage

Hello,

You can do it in a back ground script or you can create a fix script for this .

To navigate to fix script follow below steps

1) Go to main page and in left navigation type in "Fix scripts"

2) Click on new 

3)Paste the below script  and save it 

4)  On the top right corner you can find  a button called  run fix script

5)Click on it and check the status of the email logs

Script:

var gr = new GlideRecord('sys_email');

gr.query();

while(gr.next())

{

gr.type="send-ignored";

gr.update()

}

Please accept the solution if you got any help from this script

Himanshu Patel
Tera Contributor

Thank you @Mohith Devatte . This helped. Appriciate your prompt response.