- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 06:18 AM
Hi,
I am looking for a current way, on RITM creation, to generate a PDF containing the variables of the catalog item submitted, and then attach this to the RITM. I've seen the PDFGenerationAPI, and am aware this is a good way to go about it, but I don't have too much experience with scripting in this way. Does anyone have any code snippets to accomplish this or something similar? I especially want to add the display values to the PDF and not the underlying values.
Many thanks,
Angus 🙂
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 06:34 AM - edited 04-29-2024 06:35 AM
Hi @AngusWIlliams,
Can I ask the requirement or need for the variables to be attached as a PDF document?
It is common practice to simply configure the form layout and add a new form section and tab displaying the variables. These can be read only (Recommended).
This allows 'fullfillers' or service desk task managing the requests to see exactly what a user has entered? Would that not suffice and provide an easier solution for all without the need for attachments etc.
- Open the Requested Item form.
- Right-click at the top and select 'Configure > Form Layout'
- At the bottom of the form under the slush bucket (as pictured below) - Click on 'New...' to create a New form section and tab. Call it variables for example. - Hit Save.
- With that new form section highlighted, look for the field called 'Variable Editor', and double click it to move it from the left side to the right - again as show below.
- Hit Save - you now have your variables on the form for everyone to see.
- (I'll find a script for you so you can make them read-only)
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 06:30 AM
Hope this helps you, if helps mark it as accepted solution and helpful so it will help others as well.
https://www.servicenow.com/community/developer-forum/pdf-generation-in-geneva/m-p/1751071
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 06:34 AM - edited 04-29-2024 06:35 AM
Hi @AngusWIlliams,
Can I ask the requirement or need for the variables to be attached as a PDF document?
It is common practice to simply configure the form layout and add a new form section and tab displaying the variables. These can be read only (Recommended).
This allows 'fullfillers' or service desk task managing the requests to see exactly what a user has entered? Would that not suffice and provide an easier solution for all without the need for attachments etc.
- Open the Requested Item form.
- Right-click at the top and select 'Configure > Form Layout'
- At the bottom of the form under the slush bucket (as pictured below) - Click on 'New...' to create a New form section and tab. Call it variables for example. - Hit Save.
- With that new form section highlighted, look for the field called 'Variable Editor', and double click it to move it from the left side to the right - again as show below.
- Hit Save - you now have your variables on the form for everyone to see.
- (I'll find a script for you so you can make them read-only)
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 06:42 AM
Hi Robbie,
Thanks for this. We do have this added to the form, but were wondering if there were additionally a simple way to attach them as a PDF, but we can ask fulfillers to simply download the form as a PDF if needed.
Many thanks,
Angus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 03:39 AM
Why would it ever be necessary to have the variables as PDF? You are working in the system, the variables are there. What's the difference from looking at them on a PDF or on the record?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark