- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2023 03:31 AM
I am trying to create a copy of OOB retire UI action which helps to provide replacement article if we want to provide any knowledge article at a time of retiring the KA. When I click on Retire UI action which I created, popup is coming and I am able to provide replacement article, but after providing replacement article when I click on retire nothing is happening.
What is happening is.. once we click on Retire UI action it opens the UI page popup (I have attached the image for your reference) asking if we want to provide replacement article we can provide else we can select no and we can retire the article, if we select yes then we have to provide the replacement article then it will store both replacement article sys id and currently retiring KA sys id and then using gs.session in AJax this page passes sys ids to UI action.
In the UI action it is checking typeof window == undefined then only it process next steps.
But the typeof window is object here.
Please help me to understand why typof window is object here instead of undefined
https://<INSTANCE_NAME>.service-now.com/now/nav/ui/classic/params/target/sys_ui_action.do%3Fsys_id%3Df21d1087f034c510f877bdce65680991%26sysparm_record_target%3Dsys_ui_action%26sysparm_record_row%3D3%26sysparm_record_rows%3D3%26sysparm_record_list%3DnameCONTAINSretire%255EtableCONTAINSknowledge%255EORDERBYorder
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2024 10:19 PM
Hi All,
Thanks Anukur for your reply.
I just want to post the solution here also so that it might be helpful for any others, this issue was finally resolved by Unchecking the Isolate Script check box in the UI action.
Note: Isolate Script check box will not be available by default in the form view.
You can find more information about this Isolate Script check box in below two links :
https://www.servicenow.com/community/developer-blog/isolate-script-in-london/ba-p/2275821
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0743155
Best Regards,
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2023 04:02 AM
what debugging have you done so far and what's your findings?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2023 10:17 AM
Hi Ankur,
Thanks for you response,
I am getting this error in browser console when I click on retire button
Uncaught TypeError: Cannot read properties of null (reading 'destroy')
at String.destoryDialog
at klass._responseReceived (js_includes_doctype.jsx?v=07-23-2023_0036&lp=Fri_Oct_13_03_07_44_PDT_2023&c=30_703:17132:13)
at klass._processReqChange (js_includes_doctype.jsx?v=07-23-2023_0036&lp=Fri_Oct_13_03_07_44_PDT_2023&c=30_703:16961:15)
This is the AJAX call code in UI page client script
I am trying to understand why that error is coming in browser console. Kindly please help me to understand the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2024 10:19 PM
Hi All,
Thanks Anukur for your reply.
I just want to post the solution here also so that it might be helpful for any others, this issue was finally resolved by Unchecking the Isolate Script check box in the UI action.
Note: Isolate Script check box will not be available by default in the form view.
You can find more information about this Isolate Script check box in below two links :
https://www.servicenow.com/community/developer-blog/isolate-script-in-london/ba-p/2275821
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0743155
Best Regards,
Ramesh