PDF Attachment not comes from HR template to HR task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2022 11:09 PM
Hi All/
We want attach pdf documents on HR task for end user. so we use following approach. I have attach a pdf on HR template ,from this attachment comes to HR task.
We want to copy pdf attachment from HR template to HR task. Wrote After/insert BR on task table as per article.
After/insert BR
==============
(function executeRule(current, previous /*null when async*/) {
gs.addInfoMessagedd("Hello pdf in task");
GlideSysAttachment.copy('sn_hr_core_template',cfde0ab387685d5463c853973cbb35e6, 'sn_hr_core_task', current.sys_id);
})(current, previous);
Pdf attachment not comes up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2022 07:58 AM
Hello All/
Could you please look into this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2022 01:41 PM
i think there is a typo in the gs.addInfoMessagedd("Hello pdf in task"); it should be gs.addInfoMessage("Hello pdf in task");
This might stop the script execution at this line we never know so please correct it and try below code for copying the attachment
var copyAtt = new GlideSysAttachment();
copyAtt.copy('sn_hr_core_template','cfde0ab387685d5463c853973cbb35e6', 'sn_hr_core_task', current.sys_id);
Please mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2022 10:47 PM
Hello
We got log message but info message is not display and attachment not comes up in HR task from HR template. Could you please guide ?
Attachment not attach on HR task. But we got all the log and info message.
could you please tell me the reason of not attachment comes up ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2022 11:06 PM
hello
var copyAtt = new GlideSysAttachment();
copyAtt.copy('sn_hr_core_template','cfde0ab387685d5463c853973cbb35e6', 'sn_hr_core_task', current.sys_id);