code-snippets
code-snippets copied to clipboard
window == null to determine if in service portal not working
I've seen a few references to using window == null when trying to determine if in the platform or service portal. This only seems to work in my Rome PDI if isolate script is set to false
https://github.com/ServiceNowDevProgram/code-snippets/blob/b189fc01a77190556a20894fb56896e6ef44a4b7/Client%20Scripts/Get%20URL%20Parameters/script.js#L4-L14
I've found a workaround by using a try/catch block like the following:
https://github.com/litwi1rm/code-snippets/blob/63e1a015cecc56611aec8e03523e4fc2f631e555/Catalog%20Client%20Script/Clear%20all%20fields/script.js#L11-L24
Has anybody else ran into this?
I want to work on this issue, can you assign me?
@abhishek-kumar-91 I have assigned it to you, but for your information, we had a pull request already that contained a fix for it, but we were not able to accept that yet. Since then no updates, so if you do it first, the glory is your 😊. Remember to reference this issue in your PR.
"To determine the platform or service portal in Rome PDI with script isolation enabled, consider using try/catch blocks for reliable identification." ASSIGN ME THIS #416
@abhishek-kumar-91 are you working on this or can I re-assign to @rajanarahul93?
@Lacah yeah, I am still working on this issue.
Hi @abhishek-kumar-91 - just following up to see where this is at, and if you'll be able to do this one?
Want to ensure we keep these moving and open it up to the broader group if needed