- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2024 11:55 PM
Hi Experts,
I have a requirement mentioned below. Please go through it and let me the best possible solution:
I want to create a link in a form to download a PDF. It should be in the form of a record of a table, not a record producer. So I'm unable to use the 'Rich text label'. In table level, which field type I can use to give a downloadable link in a form?
Thanks in advance,
Amol
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2024 04:22 AM
Sure, you can use the URL field type to create a downloadable link in a form. Here are the steps:
1. Navigate to the table where you want to add the URL field.
2. Click on "Configure" -> "Table".
3. In the Columns section, click on "New" to add a new field.
4. In the Label field, enter the name of the field.
5. In the Type field, select "URL".
6. Fill in the rest of the fields as necessary and click "Submit".
7. Now, you can use this field to store the URL of the PDF file. When you view a record, this field will appear as a clickable link that will open the PDF file in a new tab.
Please note that the URL must be publicly accessible. If the PDF file is stored in ServiceNow, you can use the sys_id of the file in the sys_attachment table to construct the URL. The format of the URL is https://.service-now.com/sys_attachment.do?sys_id=.
nowKB.com
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/
For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2024 11:59 PM
Hello @Amol Pawar ,
Please refer the below link.
https://www.servicenow.com/community/itsm-articles/how-to-generate-pdf-from-ui-action/ta-p/2831049
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2024 03:53 AM
Hi @kps sumanth,
Thank you for your reply but the link you provided is not the direct reference.
Please provide me with any other solution if you have.
Thanks,
Amol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2024 04:02 AM
Hi @Amol Pawar ,
You can create a UI Action form button with the folowing script to export the form to pdf :-
Client : ticked
Form Button : ticked or form link
Onclick : exportPDF()
Script :
function exportPDF() {
var sysparm_table = g_form.getTableName();
var sysparm_sys_id = g_form.getUniqueValue().toString();
var a='https://dev00000.service-now.com/';
var url = a+sysparm_table + '.do?PDF&sys_id=' + sysparm_sys_id;
g_navigation.openPopup(url);
}
NOTE : In var a write your own developer instance url.
For custom url on form-
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2024 04:22 AM
Sure, you can use the URL field type to create a downloadable link in a form. Here are the steps:
1. Navigate to the table where you want to add the URL field.
2. Click on "Configure" -> "Table".
3. In the Columns section, click on "New" to add a new field.
4. In the Label field, enter the name of the field.
5. In the Type field, select "URL".
6. Fill in the rest of the fields as necessary and click "Submit".
7. Now, you can use this field to store the URL of the PDF file. When you view a record, this field will appear as a clickable link that will open the PDF file in a new tab.
Please note that the URL must be publicly accessible. If the PDF file is stored in ServiceNow, you can use the sys_id of the file in the sys_attachment table to construct the URL. The format of the URL is https://.service-now.com/sys_attachment.do?sys_id=.
nowKB.com
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/
For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER