The nlapiSetRedirectURL function is only available...
# suitescript
m
The nlapiSetRedirectURL function is only available in beforeLoad user events and in suitelets, anyway. You're on the wrong road there.