Skip to main content
KatieDev Rowe perguntou em #Apex
I can't figure out what's causing this error message. I read some other posts where the problem was formatting (copying and pasting), so I tried typing this out from scratch, but it didn't help.

no viable alternative at character
7 respostas
  1. 10 de nov. de 2015, 19:05
    Ok, so I guess the quote was not the problem, I had invalid methods, etc.

    I did get this work now, so thank you:

     

    trigger throwExceptionnnn on Opportunity (before update) {

    for (Opportunity opp : Trigger.new ){

    if ( opp.name.startsWith('B')) {

    throw new KatieException('katie test error');

    }

    }

    }

     
0/9000