- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2022 11:33 PM
Hi Everyone,
I am recently introduced to iFrame. My task is to load external URL in ServiceNow console using iFrame in Classic UI and agent workspace. Can anyone guide me to achieve this.
cc: @kamlesh kjmar
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 10:16 PM
Hi @Abhijit Das7 ,
How you can achieve this depends on where you want your iframe to be embedded. For agent workspace it will not work as agent workspace do not allow such fields to render on form. To know list of field types supported by agen workspace refer to the link provided below:
Now, since you are looking to show this in agent workspace as well, I assume you need this in any form. For this you would require two things:
1. UI Macro - To embed the link as an iframe
2. Formatter - To link with UI Macro and allow to appear on form as a field.
You can refer to the steps below:
1. Create a UI Macro as shown below. In the below code replace src value with your site URL that you want to embed.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<iframe src="https://abc.xyz" height="900px" width="1800px"></iframe>
</j:jelly>
2. Create a formatter record and attach it with UI Macro created in step 1 and with the table where you want to include this, as shown below:
3. Now include your formatter on your form page by configuring form layout:
Finally your embedded link will appear on the form as an iframe
Please note iframe will work only when the url you are trying to embed allows it's site/page to be used as an iframe, otherwise you will get error loading.
I hope this helps.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 11:59 PM
I am able to add the above steps & I am able to see the iFrame inside the incident page.
Now i want to auto populate those incident records like Incident Number & Incident Subject when i click on a process button so it auto populates .
Or
I have created a widget with scripts added there but i am able to add that widget in "Home" page only, i want to add that widget in the "Incident" page that will solve my problem.