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
jgrenfelljgrenfell 

Switch (case) syntax available?

I was at a Developers User Group meeting in NYC the other night and swore that I saw switch being used in an example by Ron Hess.  I don't see documentation for it though and can't get it to compile right when I try it (see example below, I get an error on the very first line).  So either my syntax is off OR Ron was in a beta development environment not available to the rest of us OR I'm seeing code that doesn't exist.  Any ideas anyone, Ron?

 

 

switch (strType){ case 'Counseling/Referral Case': System.debug('I would like this to work'); }

 

 

MakMak

I am sure switch-case is not available. But it would be great to have it.