Add attachments to the email function from the existing incident record.

Khalnayak
Tera Guru

Hi,

I have a requirement to allow users to add attachments from the existing incident record when using the email function.

I have come across articles, which leverage before BR and attaches all the attachments to the email.

I do not want that, In the email when i click on the attachment icon, I should see all the attachments from the incident there.

Also I have seen BR scripts which duplicate the attachment when sent.

Please help.

1 ACCEPTED SOLUTION

can you try with below code. 

 

After "Insert" business rule on "sys_email" table .

 

script:

 

(function executeRule(current, previous /*null when async*/) {

	// Add your code here

	GlideSysAttachment.copy(current.target_table,  current.instance ,'sys_email', current.sys_id);


})(current, previous);

 

See if its not creating duplicate attachment on email client. 

View solution in original post

20 REPLIES 20

Harsh Vardhan
Giga Patron

Any update on this thread? 

Let me know if you need any further help here, 

 

if my answer helped, kindly mark the answer correct and close this thread.