Excel attachment is not getting attached while template is applied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 12:04 AM
Hi everyone,
I have created a template (not standard change template) on Change Request table. In that there is an excel file I have attached to that template. But when I applied that template the values are populating but the attachment is not getting attached to the change request.
Can someone tell me how can I achieve this?
Regards,
Pallavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 01:31 AM
Hi @Pallavi65
The attachment won't be added.
Recently I have answered this question. Please go through the below link:
Hope it helps.
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 03:36 AM
Hello Murthy,
I have used the same code, but it has not worked for me.
So, when a template is applied to a change request, then the short description will change to something. So, I have written a on Change CS on the field short description but it's not working:
Please note I have created one more type on CR and using this, it's not Normal, Standard or Emergency
My Code:
on Change CS:
if(type == 'test'){
if(isTemplate && newValue == 'Test request'){
var ga = new GlideAjax('SInclude');
ga.addParm('sysparm_name','fnc');
ga.addParm('sysparm_attach',newValue);
ga.getXML(answer);
}
function answer(response)
{
}
................................................................................................................................................
and in Script Include:
GlideSysAttachment.copy('sys_template','here given the sys_id of the template','Change_request',this.getParameter('sysparm_attach'));
So please help
Regards,
Pallavi