SPM Export to PowerPoint Template for Demands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 01:27 PM
Hello! Has anyone exported demand data to a PowerPoint template or can this only be done once in the project stage/project status templates? TY!
- 2,045 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 06:09 AM
Not fully tuned but we have the same requirement, and I found my way to an MVP:
PPT Template:
I haven't read the docs so not sure of the options here but I followed the existing templates examples of how to configure multiple rows:
https://servicenow.com/distinctionFlag=related/childTable=dmn_requirement/relatedTo=base/orderByColu...
Setup the report type definition:
Setup the Template record and add the attachment:
Run the script (need to put this in a UI action etc to make it useful):
var inputDemandID = '7a915d3d9306311054327ee32bba1036'
var PPTGen = new sn_ppt_export.PPTRequestHandler(inputDemandID)
//runPPTGenerator inputs: [string] Table Of Input Record, [string] SysID Of Input Record, [string] Table Of Attachment Record, [string] SysID Of Attachment Record, [string] Attachment File Name
gs.log(PPTGen.runPPTGenerator("dmn_demand",inputDemandID,"dmn_demand",inputDemandID,"MyPPTFileName.pptx"));
Download the attachment:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2023 10:46 AM
Hi @rhysbrennan I have the same requirement and implemented your solution but somehow gave me the attached errors. I have created a new template and used the existing template as well but no luck. Could you have a look and let me know, please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2025 01:23 PM
Hi there - did you ever figure out a solution for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 12:03 PM
Try this, i had to modified a code a bit and worked for me. Please have a look an dtry
var inputDemandID = current.sys_id;
var template = "d9048f5f933231107bc570aefaba10f4";
var PPTGen = new sn_ppt_export.PPTRequestHandler(template);
//runPPTGenerator inputs: [string] Table Of Input Record, [string] SysID Of Input Record, [string] Table Of Attachment Record, [string] SysID Of Attachment Record, [string] Attachment File Name
var generatePPT = PPTGen.runPPTGenerator("dmn_demand", inputDemandID, "dmn_demand", inputDemandID, "MyPPTFileName.pptx");
gs.log("GenerateReport" + generatePPT);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 12:45 PM
Thank you so much for responding! I ended up doing the same and got it working. Added an info message so the user knows it was successful and will be attached to the record, as well as a redirect to stay on the current page.
Thanks again!