window.location is not working in UI script it is working only once
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2023 12:51 AM
window.location is not working in UI script it is working only once, but UI pages loads twice in our requirement once when the user logins, and then user clicks on any widget then also it runs second time, the thing is when i tested by adding alert's the first time when the user logins it is fetching URL perfectly but second time when we click on widget then it is unable to fetch the URL is there any alternative for this ? and also i want to know whether myVariable.includes(searchTerm) , window.location.assign() will work in UI script ? and for this issue work around window.location , i am using top.location.href it is fetching URL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2023 01:55 AM
• Check the syntax of the window.location code.
• Ensure that the window.location code is inside the correct function.
• Check the browser console for any errors.
• Make sure the window.location code is not inside an iframe.
• Check the URL for the window.location code.
• Make sure the window.location code is not being overridden by another script.
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