on 05-20-2016 2:51 PM
Hi experts, How can I code for completely exiting the java script code . I have used break in for loop but that is only for that iteration. Please suggest. Best regards, pradeep.
Hello Pradeep,
You can try using:
return;
Kind regards,
Cris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pradeep,
you can ignore the validation error "return used ouside of function" (or similar). The validation is needlessly strict. We relaxed this validation with SP03.
Also, Cristiano's approach of throwing an error should not be necessary. You should always try to stop a script using the "return" statement instead.
Best Regards,
Clemens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.