Does "next screen" mean a different displayable (form or canvas)? If so, your CommandAction method can
test for that, because the displayable is an argument to the method. (Or you could nominate a different object to be the command listener for your next screen.)
If you're using the same displayable, and changing its contents to make it the "next screen", then you need to have a flag or state code or something similar as an instance variable, and test that in your CommandAction method.