Iframe with script so i get the current page incident details like subject , description upon click
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 12:32 AM
Hi Everyone,
I am able to create an iFrame inside the Incident page.
Now I want to auto populate those current Incident records like Incident Number & Incident Subject when I click on a process button so it auto populates those details into my A360 process.
Or
I have also created a Widget with scripts added there and 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 very easily.
If anyone can help me with either of the issue, it would be so helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 12:40 AM
then try to see in somehow if you can access the URL
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 12:59 AM
Hi @Ankur Bawiskar
I have attached the screenshot where if you would see I am able to get the incident number, subject, description etc. using the script I have written attached image.
The iframe is also loading correctly.
Now when I press the button highlighted in red in the attached image , then the incident data should be auto -populated in my form ( image attached).
Script i have written :-
You can check & resolve it( listener seems most likely the issue)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 01:01 AM
Hi @Ankur Bawiskar
The code below is the listerner issue, the red button that i click highlighted above image , the ID of that process is mentioned a "4938". which means when i click on that process it should auto fill my form , form is attached in previous message image
--------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 01:42 AM
I don't think using onLoad client script you can access the elements within iframe.
whatever needs to be done should be within the widget
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 03:06 AM
Hi @Ankur Bawiskar
How can that be done, if you could guide me on that , with all the info i shared above and as you mentioned everything should be on widget side.
My instance of service now is classic UI