Iframe with script so i get the current page incident details like subject , description upon click

Aditya007aa
Tera Contributor

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.

15 REPLIES 15

@Aditya007aa 

did you try getting the URL inside the widget and see if you can access the incident sysId?

If yes then you can get the incident number by doing GlideRecord

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Aditya007aa 

I couldn't create this, I am unable to select widget in formatter

AnkurBawiskar_0-1741774754311.png

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

Can we connect on zoom so i can show you my issue & we can try to resolve it

@Aditya007aa 

Sorry I can't due to restrictions on my laptop.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Aditya007aa
Tera Contributor

Hi @Ankur Bawiskar 
My ServiceNow instance is Classic, so i want to run my widget ( created under Service Portal page) into my Incident Page. File is attached.
Later , I created a UI macro to access this widget there & then created a formatter & then added the same formatter to my Incident Page Layout.

Secondly, then I created a UI macro with just iframe code , it loads successfully in m Incident Page with iframe. How do i write the attached code the same way in my UI macro so it will resolve the issue.