• Sakshi Nagpal 30
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I'm trying to do a switch statement in Apex, I'm assuming the syntax will be like java, but I can't seem to get it to compile; I get an "unexpected token: {" error message. Am I missing something obvious?  I have many more cases to add and I'm hoping I don't have to do if statements for each one.

Code:
switch (ce_days) {
 case 180:
  milestone = 180;
}//end switch