How to remove attachments in email without removing the record from attachements table

GANESH23
Tera Contributor

Hi Team,

I want to remove attchment from email while sending,at it is in send-ready state without removing the record from sys attachments table.

Thanks,

28 REPLIES 28

How did that file get attached to the email record in the first place?

Appli
Mega Sage
Mega Sage

Hi Ganesh

If email is triggered by a notification, you may consider unchecking "Include attachments" field.

As result, attachments will not be sent.

find_real_file.png

 

Thank you

Hope it helps

Tony Chatfield1
Kilo Patron

Hi, reviewing the supplied information (and reading between the lines) this requirement appears to be part of a larger solution?
And you probably need to review the end to end context, to ensure you deliver the most appropriate implementation…..

Based on the details provided, I don't think you need to delete the 'attachment' but you do need to change the table_name\table_sys_id for the attachment record
and you do need to delete the related sys_email_attachment record

So you could look at an after insert BR on sys_email

After the outbound message is inserted into sys_email

  • Insert a new record into your custom table (or somehow find the appropriate existing record)
  • Query sys_attachment table for your attachment
    table_name = 'sys_email'
    table_sys_id = current.sys_id (sys_id of your outbound email record)
  • Update the sys_attachment record
    table_name = custom table_name
    table_sys_id = custom record sys_id
  • Update the message body of your email to include a link to your custom record.
  • Query sys_email_attachment and delete the entry for your email\attachment.

Hi Tony,

Great..

This is the solution iam looking for. Thank you so much.

while doin BR on sys email table iam taking filter condition as target is scheduled....... content. is this fine? or any field i have to take?

i want to insert a link in body. that link should downloadable link. is there any way is there to link become a downloadable link?

how to update message body of email. pls give some example. insteasd of string field need to update downloadable link in message.

 

Thanks,

Ganesh.