Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Scheduled Report Didn't Include attachments

SnowDEV2
Kilo Expert

I have created a scheduled report and attached few excel files to it but when I executed the report recipients are not getting any attachments..

mails sent without attachment?

Does any one come across this issue before?

7 REPLIES 7

zheil
Mega Expert

Have you checked your maximum attachment size setting?


harikrish_v
Mega Guru

Hi Lathesh,



Goto sys_properties.list, and check the value for this property:- com.glide.attachment.max_size, if its value is below 25, make it as 25. This will make sure that you can attach a file as big as 25 mb in your email. 25mb is the upper limit even if you give a value more than this for the property. Clear your system cache and then try once more, it should work(append cache.do to your instance url like https://myinstance.service-ow.com/cache.do to clear cache)



Thanks & regards,


Hari


I think this an issue with the below business rule where we had requirement to attach a an attachment when sent from email client but   it is impacting:other functionality. Any idea how to filter this..?


business rule


when: after insert/update


condition: !current.instance.nil()



function appendAttachment() {


     


      var instance = current.instance;


      var targetTable = current.target_table;


      var gr = new GlideRecord('sys_attachment');


      gr.addQuery('table_sys_id',current.sys_id);


      gr.query();


   


   


      while(gr.next()){


             


              //gs.log('Found a record');


              gr.table_sys_id = instance;


              gr.table_name = targetTable;


              gr.update();


              var task = new GlideRecord(targetTable);


              task.addQuery('sys_id',instance);


              task.query();


              while (task.next()) {


             


                   


                    task.work_notes = "Attachment " + gr.file_name + " added from Email Client by " + current.sys_created_by;


                      //task.comments = "Attachment " + gr.file_name + " added from Email Client by " + current.sys_created_by;


                      task.update();


                   


              }


      }


Try deactivating the rule and running the report.