function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lapaullapaul 

What command to exit a Apex method

Hi,

what's the command to exit in the middle of a Apex method? Please advice.

 

thanks,

Paul

 

Jeremy_nJeremy_n

Typically "return" will do that for you, is that what you need?

 

Jeremy

gv007gv007

I think there is no exit() like method in apex ,you need use a page ref method in that based on yours condition call the

 

'apex/logout.jsp page that will work.let us know .

lapaullapaul

Thanks. That's all I need. How come I did not think of that.