I am using window.location.replace function. it sa...
# suitescript
v
I am using window.location.replace function. it says "window" is not defined what should i do?
n
Where are you using it?
If it's in a client script on a SuiteLet you should be able to set :
Copy code
document.location.href
v
ok sir, i will try this
if i use, document.location.href, it says document is not defined.
n
When you ask for help could you please be clear about the script type and context/entry point. I've had to guess with your question and could be wrong. Please add more detail. In general, it's helpful to share your code, not just the line but at least the surrounding code / any variable declarations but preferably the whole script.